diff options
author | Iru Cai <mytbk920423@gmail.com> | 2021-05-12 22:31:21 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2021-05-12 22:31:21 +0800 |
commit | ac6a16620ace0a5b70e697eb6fce42806eb33a84 (patch) | |
tree | 8044051401e4e886811dbd7f2de8b5df3e3d6f23 /asm/rich4_crt_mthread.asm | |
parent | 27497ad5adca4630a273087cf48246e213302fdf (diff) | |
download | rich4-ac6a16620ace0a5b70e697eb6fce42806eb33a84.tar.xz |
move __InitThreadData
Diffstat (limited to 'asm/rich4_crt_mthread.asm')
-rw-r--r-- | asm/rich4_crt_mthread.asm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/asm/rich4_crt_mthread.asm b/asm/rich4_crt_mthread.asm index 9974ca6..d432860 100644 --- a/asm/rich4_crt_mthread.asm +++ b/asm/rich4_crt_mthread.asm @@ -14,7 +14,6 @@ extern __imp__GetCurrentThreadId@0 extern clib_free extern fcn_0045c836 extern fcn_0045e8ca -extern __InitThreadData extern lib_calloc extern ref_00488f78 extern ref_00488f7c @@ -28,6 +27,7 @@ extern fcn_0045c585 extern ref_0046c97c extern ref_0046c9a1 extern ref_0046c9c9 +extern __init_stack_limits section .text @@ -365,3 +365,22 @@ pop edi pop esi pop ebx ret + + ;; mthrdini.c + +__InitThreadData: +push ebx +mov ebx, dword [esp + 8] +test ebx, ebx +je short loc_0045c8ff ; je 0x45c8ff +push 0 +push ebx +mov dword [ebx + 0xc], 1 +call __init_stack_limits ; call 0x45a666 +add esp, 8 +call dword [cs:__imp__GetCurrentThreadId@0] ; ucall: call dword cs:[0x46238c] +mov dword [ebx + 0xda], eax + +loc_0045c8ff: +pop ebx +ret |