Function at 0x40cd70
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
cmp byte [0x4e8844], 0
push ebx
push esi
push edi
jne 0x40cd8e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword fs:[0x24]
cmp dword [0x4e7484], ebx
je 0x40cda9
push dword [0x4e7cf8]
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov edi, dword [ebp + 8]
cmp word [edi], 0
jne 0x40cdb6
xor esi, esi
jmp 0x40cdf0
lea eax, [esp + 0x13]
mov ecx, 0x4e7d50
push eax
push 3
lea eax, [esp + 0x1c]
push eax
push 0
push edi
call fcn.0043b290
mov esi, eax
test esi, esi
jne 0x40cdf0
cmp byte [esp + 0x13], al
mov ecx, 0x4e7d50
setne al
inc eax
push eax
push dword [esp + 0x18]
push esi
push edi
call fcn.0043b7f0
mov esi, eax
cmp dword [ebp + 0xc], 0
mov cl, byte [esi + 0x17]
je 0x40ce4d
cmp cl, 4
je 0x40cf56
push 0x14
push dword [0x4e583c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x40cf46
mov dword [0x4e583c], eax
cmp dword [0x4e7484], ebx
je 0x40ce39
push dword [0x4e7cf8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x4e583c]
push 0
push esi
mov ecx, eax
call fcn.00401490
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp cl, 4
je 0x40ce6d
test cl, cl
jne 0x40ce5b
mov eax, dword [esi + 0xc]
jmp 0x40ce5d
mov eax, esi
test byte [eax + 0x15], 0xa
jne 0x40ce6d
cmp dword [eax + 0xc], 0
je 0x40cf56
mov eax, dword [esi + 8]
cmp word [eax], 0
jne 0x40cf1a
mov eax, dword [esi + 0x10]
cmp cl, 4
jne 0x40ce8c
push edi
push 0
call eax
add esp, 8
jmp 0x40ce93
test eax, eax
jne 0x40ce93
mov eax, dword [esi + 0xc]
add eax, 0x101
push eax
push dword [0x4e583c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x40cf46
mov al, byte [esi + 0x17]
mov dword [0x4e583c], ecx
cmp al, 4
jne 0x40ceed
mov eax, dword [esi + 0x10]
push edi
push ecx
cmp eax, 0x45ce40
jne 0x40cfa6
add dword [0x4e30fc], 0x108
call eax
add esp, 8
sub dword [0x4e30fc], 0x108
jmp 0x40cfab
test al, al
jne 0x40cf03
mov eax, dword [esi + 0xc]
push dword [eax + 4]
push dword [eax]
call fcn.00401490
jmp 0x40cfa8
cmp al, 1
jne 0x40cfab
push dword [esi + 4]
push dword [esi]
call fcn.00401490
jmp 0x40cfa8
cmp cl, 4
jne 0x40cf2c
mov eax, dword [esi + 0x10]
push edi
push 0
call eax
add esp, 8
jmp 0x40cf32
mov eax, dword [esi + 0xc]
add eax, 2
push eax
push dword [0x4e583c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
jne 0x40cf76
push edi
push 0x4cdaa4
mov ecx, 0x4e7d50
call fcn.00447cc0
cmp dword [0x4e7484], ebx
je 0x40cf6a
push dword [0x4e7cf8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 0x4b9c10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [esi + 0x17]
mov dword [0x4e583c], eax
test cl, cl
jne 0x40cf8d
mov ecx, dword [esi + 0xc]
push eax
call fcn.004a09f0
jmp 0x40cfab
cmp cl, 1
jne 0x40cf9c
push eax
mov ecx, esi
call fcn.004a09f0
jmp 0x40cfab
cmp cl, 4
jne 0x40cfab
push edi
push eax
mov eax, dword [esi + 0x10]
call eax
add esp, 8
cmp dword [0x4e7484], ebx
je 0x40cfbf
push dword [0x4e7cf8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x4e583c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret