Function at 0x40ecc0
Capabilities:
Resume thread
Suspend thread

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x500
mov rbx, rcx
mov ecx, dword [0x00423eec]
test ecx, ecx
je 0x40ed00
mov edx, dword [0x00423ee8]
test edx, edx
jne 0x40ed00
lea rax, [0x0044e320]
cmp rbx, rax
jne 0x40ef80
nop dword [rax + rax]
mov rdi, qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
lea rbp, [rsp + 0x2c]
xor esi, esi
mov r12, qword [sym.imp.KERNEL32.dll_SuspendThread]
mov r13, qword [sym.imp.KERNEL32.dll_GetThreadContext]
mov r14, qword [sym.imp.KERNEL32.dll_ResumeThread]
nop dword [rax]
nop word cs:[rax + rax]
mov rcx, qword [rbx + 0x10]
mov rdx, rbp
call rdi
test eax, eax
je 0x40ed4b
cmp dword [rsp + 0x2c], 0x103
jne 0x40eded
mov rcx, qword [rbx + 0x10]
call r12
cmp eax, 0xffffffff
je 0x40eda0
mov dword [rsp + 0x60], 0x100003
lea rdx, [rsp + 0x30]
mov rcx, qword [rbx + 0x10]
call r13
test eax, eax
jne 0x40ee60
mov rcx, qword [rbx + 0x10]
call r14
cmp eax, 0xffffffff
jne 0x40eda0
lea rcx, str.ResumeThread_failed_in_suspend_loop
call sym.GC_default_on_abort.lto_priv.46
call qword [sym.imp.KERNEL32.dll_DebugBreak]
nop dword [rax + rax]
nop word cs:[rax + rax]
cmp esi, 1
jle 0x40edad
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
add esi, 1
cmp esi, 0xf423f
jle 0x40ed30
lea rcx, str.SuspendThread_loop_failed
call sym.GC_default_on_abort.lto_priv.46
call qword [sym.imp.KERNEL32.dll_DebugBreak]
mov rcx, qword [rbx + 0x10]
mov rdx, rbp
call rdi
test eax, eax
je 0x40ed4b
cmp dword [rsp + 0x2c], 0x103
je 0x40ed4b
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rbx + 8]
mov eax, edx
shr eax, 8
xor eax, edx
lea rdx, [0x004231c0]
movzx eax, al
mov rcx, qword [rdx + rax*8]
cmp rbx, rcx
jne 0x40ee23
jmp 0x40efaa
mov rcx, rax
mov rax, qword [rcx]
cmp rbx, rax
jne 0x40ee20
mov rax, qword [rbx]
mov qword [rcx], rax
mov eax, dword [0x00423ee8]
test eax, eax
jne 0x40ef50
add rsp, 0x500
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rax, qword [rsp + 0xa8]
mov qword [rbx + 0x48], rax
mov rax, qword [rsp + 0xb0]
mov qword [rbx + 0x50], rax
mov rax, qword [rsp + 0xb8]
mov qword [rbx + 0x58], rax
mov rax, qword [rsp + 0xc0]
mov qword [rbx + 0x60], rax
mov rax, qword [rsp + 0xd0]
mov qword [rbx + 0x68], rax
mov rax, qword [rsp + 0xd8]
mov qword [rbx + 0x70], rax
mov rax, qword [rsp + 0xe0]
mov qword [rbx + 0x78], rax
mov rax, qword [rsp + 0xe8]
mov qword [rbx + 0x80], rax
mov rax, qword [rsp + 0xf0]
mov qword [rbx + 0x88], rax
mov rax, qword [rsp + 0xf8]
mov qword [rbx + 0x90], rax
mov rax, qword [rsp + 0x100]
mov qword [rbx + 0x98], rax
mov rax, qword [rsp + 0x108]
mov qword [rbx + 0xa0], rax
mov rax, qword [rsp + 0x110]
mov qword [rbx + 0xa8], rax
mov rax, qword [rsp + 0x118]
mov qword [rbx + 0xb0], rax
mov rax, qword [rsp + 0x120]
mov qword [rbx + 0xb8], rax
mov rax, qword [rsp + 0xc8]
mov qword [rbx + 0x40], rax
mov byte [rbx + 0x3b], 1
jmp 0x40ee3f
lea r8, [0x00423f00]
shr rcx, 0xc
mov edx, 1
and ecx, 0x3ffff
mov rax, rcx
shl rdx, cl
shr rax, 6
add rax, 0x1c79
lock or qword [r8 + rax*8], rdx
jmp 0x40ee3f
cmp qword [0x00423ee0], 0
jne 0x40ed00
mov rcx, rbx
xor r8d, r8d
mov edx, 1
and rcx, 0xfffffffffffff000
call sym.GC_remove_protection.part.26
jmp 0x40ed00
mov rcx, qword [rbx]
mov qword [rdx + rax*8], rcx
jmp 0x40ee3f