Function at 0x10005d00
Capabilities:
Resume thread

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x2d0
push ebp
xor ebp, ebp
cmp eax, ebp
je 0x10005d19
mov ecx, dword [0x1000cd24]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1000cd1c], eax
je 0x10005d36
mov eax, 0x10dd
pop ebp
add esp, 0x2d0
ret 4
cmp dword [0x1000cd20], ebp
je 0x10005d52
call fcn.10005be0
mov eax, dword [0x1000cd20]
pop ebp
add esp, 0x2d0
ret 4
push ebx
push esi
mov esi, dword [0x1000cd2c]
push edi
cmp esi, ebp
je 0x10005e1a
mov ebx, 0xd
mov eax, dword [esi + 4]
cmp eax, ebp
mov eax, dword [esi + 0x10]
je 0x10005dcf
mov edi, dword [eax + 0x20]
xor edx, edx
mov dl, byte [eax + 0x17]
cmp edi, edx
jge 0x10005dac
lea ecx, [esp + 0x10]
mov edx, edi
push ecx
mov ecx, dword [esi + 0xc]
push ebp
add edx, ecx
push eax
push edx
mov dword [esp + 0x20], ebp
call fcn.10006e00
cmp dword [esp + 0x10], ebp
jne 0x10005dac
mov ecx, dword [esi + 0x10]
mov edi, eax
xor edx, edx
sub edi, ecx
mov dl, byte [ecx + 0x17]
cmp edi, edx
jl 0x10005d7e
mov eax, dword [esi + 0x10]
xor ecx, ecx
mov cl, byte [eax + 0x17]
cmp edi, ecx
je 0x10005dc7
mov dword [0x1000cd20], ebx
mov edx, dword [esi + 8]
mov dword [0x1000cd24], edx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
jmp 0x10005e0e
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0x20]
mov edx, dword [esi + 0xc]
mov byte [eax + edx], 0xe9
add eax, edx
lea edx, [eax + 5]
inc eax
sub ecx, edx
mov dword [eax], ecx
mov edx, dword [esi + 0x10]
lea edi, [eax + 4]
mov ecx, dword [edx + 0x18]
cmp edi, ecx
jae 0x10005e08
sub ecx, edi
mov eax, 0xcccccccc
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x10]
mov dword [eax], ecx
mov esi, dword [esi]
cmp esi, ebp
jne 0x10005d68
mov edi, dword [0x1000cd28]
cmp edi, ebp
je 0x10005ecb
mov ebp, dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov eax, dword [edi + 4]
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], 0x10001
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10005ebf
mov esi, dword [0x1000cd2c]
test esi, esi
je 0x10005ebf
mov eax, dword [esp + 0xcc]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x10005e7d
mov ecx, dword [esi + 0x10]
cmp eax, ecx
jb 0x10005eb9
lea edx, [ecx + 4]
cmp eax, edx
jae 0x10005eb9
sub eax, ecx
mov dword [esp + 0xcc], eax
mov edx, dword [esi + 0xc]
jmp 0x10005e9e
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jb 0x10005eb9
mov edx, dword [esi + 0x10]
xor ebx, ebx
mov bl, byte [edx + 0x17]
add ebx, ecx
cmp eax, ebx
jae 0x10005eb9
sub eax, ecx
mov dword [esp + 0xcc], eax
mov edx, dword [esi + 0x10]
mov ecx, dword [edi + 4]
add eax, edx
mov dword [esp + 0xcc], eax
lea eax, [esp + 0x14]
push eax
push ecx
call ebp
mov eax, dword [esp + 0xcc]
mov esi, dword [esi]
test esi, esi
jne 0x10005e5a
mov edi, dword [edi]
test edi, edi
jne 0x10005e2e
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x1000cd2c]
mov ebx, eax
cmp esi, ebp
je 0x10005f3f
mov ebp, dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x10]
push edx
xor edx, edx
mov dl, byte [ecx + 0x17]
push eax
mov eax, dword [esi + 0xc]
push edx
push eax
call fcn.10006ba0
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
xor edx, edx
mov dl, byte [ecx + 0x17]
push edx
push eax
push ebx
call ebp
mov eax, dword [esi + 4]
test eax, eax
je 0x10005f2c
mov eax, dword [esi + 0x10]
test eax, eax
je 0x10005f2c
push eax
call fcn.10005cc0
add esp, 4
mov dword [esi + 0x10], 0
mov edi, dword [esi]
push esi
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov esi, edi
test edi, edi
jne 0x10005ee3
xor ebp, ebp
mov dword [0x1000cd2c], ebp
call fcn.10005c90
mov esi, dword [0x1000cd28]
cmp esi, ebp
je 0x10005f71
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esi + 4]
push ecx
call ebx
mov edi, dword [esi]
push esi
call sub.MFC42u.DLL_operatordelete
add esp, 4
cmp edi, ebp
mov esi, edi
jne 0x10005f5a
mov eax, dword [esp + 0x2e4]
pop edi
pop esi
cmp eax, ebp
mov dword [0x1000cd28], ebp
mov dword [0x1000cd1c], ebp
pop ebx
je 0x10005f93
mov edx, dword [0x1000cd24]
mov dword [eax], edx
mov eax, dword [0x1000cd20]
pop ebp
add esp, 0x2d0
ret 4