Function at 0x40cff0
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
cmp byte [0x4e8668], 0
push ebx
push esi
push edi
jne 0x40d00e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword fs:[0x24]
cmp dword [0x4e72e4], ebx
je 0x40d029
push dword [0x4e7b58]
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov edi, dword [ebp + 8]
cmp word [edi], 0
jne 0x40d036
xor esi, esi
jmp 0x40d070
lea eax, [esp + 0x13]
mov ecx, 0x4e7b70
push eax
push 3
lea eax, [esp + 0x1c]
push eax
push 0
push edi
call fcn.0043ac50
mov esi, eax
test esi, esi
jne 0x40d070
cmp byte [esp + 0x13], al
mov ecx, 0x4e7b70
setne al
inc eax
push eax
push dword [esp + 0x18]
push esi
push edi
call fcn.0043b1b0
mov esi, eax
cmp dword [ebp + 0xc], 0
mov cl, byte [esi + 0x17]
je 0x40d0cd
cmp cl, 4
je 0x40d1d6
push 0x14
push dword [0x4e587c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x40d1c6
mov dword [0x4e587c], eax
cmp dword [0x4e72e4], ebx
je 0x40d0b9
push dword [0x4e7b58]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x4e587c]
push 0
push esi
mov ecx, eax
call fcn.00401460
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp cl, 4
je 0x40d0ed
test cl, cl
jne 0x40d0db
mov eax, dword [esi + 0xc]
jmp 0x40d0dd
mov eax, esi
test byte [eax + 0x15], 0xa
jne 0x40d0ed
cmp dword [eax + 0xc], 0
je 0x40d1d6
mov eax, dword [esi + 8]
cmp word [eax], 0
jne 0x40d19a
mov eax, dword [esi + 0x10]
cmp cl, 4
jne 0x40d10c
push edi
push 0
call eax
add esp, 8
jmp 0x40d113
test eax, eax
jne 0x40d113
mov eax, dword [esi + 0xc]
add eax, 0x101
push eax
push dword [0x4e587c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x40d1c6
mov al, byte [esi + 0x17]
mov dword [0x4e587c], ecx
cmp al, 4
jne 0x40d16d
mov eax, dword [esi + 0x10]
push edi
push ecx
cmp eax, 0x45c930
jne 0x40d226
add dword [0x4e30f4], 0x108
call eax
add esp, 8
sub dword [0x4e30f4], 0x108
jmp 0x40d22b
test al, al
jne 0x40d183
mov eax, dword [esi + 0xc]
push dword [eax + 4]
push dword [eax]
call fcn.00401460
jmp 0x40d228
cmp al, 1
jne 0x40d22b
push dword [esi + 4]
push dword [esi]
call fcn.00401460
jmp 0x40d228
cmp cl, 4
jne 0x40d1ac
mov eax, dword [esi + 0x10]
push edi
push 0
call eax
add esp, 8
jmp 0x40d1b2
mov eax, dword [esi + 0xc]
add eax, 2
push eax
push dword [0x4e587c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
jne 0x40d1f6
push edi
push 0x4cdb90
mov ecx, 0x4e7b70
call fcn.00447e20
cmp dword [0x4e72e4], ebx
je 0x40d1ea
push dword [0x4e7b58]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 0x4b9c40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [esi + 0x17]
mov dword [0x4e587c], eax
test cl, cl
jne 0x40d20d
mov ecx, dword [esi + 0xc]
push eax
call fcn.004a0e50
jmp 0x40d22b
cmp cl, 1
jne 0x40d21c
push eax
mov ecx, esi
call fcn.004a0e50
jmp 0x40d22b
cmp cl, 4
jne 0x40d22b
push edi
push eax
mov eax, dword [esi + 0x10]
call eax
add esp, 8
cmp dword [0x4e72e4], ebx
je 0x40d23f
push dword [0x4e7b58]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x4e587c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret