Function at 0x410ba0
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
push edi
push esi
xor esi, esi
push ebx
mov ebx, eax
sub esp, 0x2ec
call sym._GC_win32_unprotect_thread
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
lea ebp, [esp + 0x10]
lea esi, [esi]
mov eax, dword [ebx + 0xc]
mov dword [esp + 4], ebp
mov dword [esp], eax
call edi
sub esp, 8
test eax, eax
mov eax, dword [ebx + 0xc]
je 0x410be4
cmp dword [esp + 0x10], 0x103
jne 0x410c90
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
sub esp, 4
cmp eax, 0xffffffff
je 0x410c51
cmp dword [0x42a4bc], 1
sbb eax, eax
and eax, 0xbffffffc
add eax, 0x40010007
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
sub esp, 8
test eax, eax
jne 0x410d50
mov eax, dword [ebx + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
cmp eax, 0xffffffff
jne 0x410c51
mov dword [esp], str.ResumeThread_failed_in_suspend_loop
call sym._GC_default_on_abort.lto_priv.70
call dword [sym.imp.KERNEL32.dll_DebugBreak]
cmp esi, 1
jle 0x410c66
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
add esi, 1
cmp esi, 0xf423f
jle 0x410bc0
mov dword [esp], str.SuspendThread_loop_failed
call sym._GC_default_on_abort.lto_priv.70
call dword [sym.imp.KERNEL32.dll_DebugBreak]
jmp 0x410bc0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebx + 8]
sub esp, 4
mov eax, edx
shr eax, 8
xor eax, edx
movzx eax, al
mov ecx, dword [eax*4 + 0x42a060]
cmp ebx, ecx
jne 0x410cd2
mov edx, dword [ebx]
mov esi, ebx
mov dword [eax*4 + 0x42a060], edx
jmp 0x410ce9
mov ecx, esi
mov esi, dword [ecx]
cmp ebx, esi
jne 0x410cd0
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [0x42a7e4]
test eax, eax
jne 0x410dc0
cmp esi, 0x42a480
je 0x410d41
mov eax, dword [esi + 4]
mov edx, eax
shr edx, 0x16
mov ecx, dword [edx*4 + 0x446214]
mov edx, eax
shr edx, 0xc
and edx, 0x3ff
mov edx, dword [ecx + edx*4]
mov ecx, dword [edx + 0x10]
movzx edx, byte [edx + 0xc]
call sym._free_internal.isra.31
mov eax, esi
shr eax, 0x16
mov edx, dword [eax*4 + 0x446214]
mov eax, esi
shr eax, 0xc
and eax, 0x3ff
mov eax, dword [edx + eax*4]
mov ecx, dword [eax + 0x10]
movzx edx, byte [eax + 0xc]
mov eax, esi
call sym._free_internal.isra.31
add esp, 0x2ec
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x14]
or byte [ebx + 0x10], 0x40
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0xa4]
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0xb0]
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0xb4]
mov dword [ebx + 0x24], eax
mov eax, dword [esp + 0xb8]
mov dword [ebx + 0x28], eax
mov eax, dword [esp + 0xbc]
mov dword [ebx + 0x2c], eax
mov eax, dword [esp + 0xc0]
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0xc4]
mov dword [ebx + 0x34], eax
mov eax, dword [esp + 0xc8]
mov dword [ebx + 0x38], eax
mov eax, dword [esp + 0xd8]
mov dword [ebx + 0x14], eax
add esp, 0x2ec
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ecx
mov edx, 1
shr ecx, 0xc
shr eax, 0x11
shl edx, cl
and eax, 0x1fff
add eax, 0x307c
lock or dword [eax*4 + 0x42a820], edx
jmp 0x410ce9