Function at 0x40d060
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
cmp byte [0x4e9670], 0
push ebx
push esi
push edi
jne 0x40d07e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword fs:[0x24]
cmp dword [0x4e82ec], ebx
je 0x40d099
push dword [0x4e8b60]
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov edi, dword [ebp + 8]
cmp word [edi], 0
jne 0x40d0a6
xor esi, esi
jmp 0x40d0e0
lea eax, [esp + 0x13]
mov ecx, 0x4e8b78
push eax
push 3
lea eax, [esp + 0x1c]
push eax
push 0
push edi
call fcn.0043b900
mov esi, eax
test esi, esi
jne 0x40d0e0
cmp byte [esp + 0x13], al
mov ecx, 0x4e8b78
setne al
inc eax
push eax
push dword [esp + 0x18]
push esi
push edi
call fcn.0043be60
mov esi, eax
cmp dword [ebp + 0xc], 0
mov cl, byte [esi + 0x17]
je 0x40d13d
cmp cl, 4
je 0x40d246
push 0x14
push dword [0x4e687c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
je 0x40d236
mov dword [0x4e687c], eax
cmp dword [0x4e82ec], ebx
je 0x40d129
push dword [0x4e8b60]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x4e687c]
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 0x40d15d
test cl, cl
jne 0x40d14b
mov eax, dword [esi + 0xc]
jmp 0x40d14d
mov eax, esi
test byte [eax + 0x15], 0xa
jne 0x40d15d
cmp dword [eax + 0xc], 0
je 0x40d246
mov eax, dword [esi + 8]
cmp word [eax], 0
jne 0x40d20a
mov eax, dword [esi + 0x10]
cmp cl, 4
jne 0x40d17c
push edi
push 0
call eax
add esp, 8
jmp 0x40d183
test eax, eax
jne 0x40d183
mov eax, dword [esi + 0xc]
add eax, 0x101
push eax
push dword [0x4e687c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x40d236
mov al, byte [esi + 0x17]
mov dword [0x4e687c], ecx
cmp al, 4
jne 0x40d1dd
mov eax, dword [esi + 0x10]
push edi
push ecx
cmp eax, 0x45d5e0
jne 0x40d296
add dword [0x4e40f4], 0x108
call eax
add esp, 8
sub dword [0x4e40f4], 0x108
jmp 0x40d29b
test al, al
jne 0x40d1f3
mov eax, dword [esi + 0xc]
push dword [eax + 4]
push dword [eax]
call fcn.00401460
jmp 0x40d298
cmp al, 1
jne 0x40d29b
push dword [esi + 4]
push dword [esi]
call fcn.00401460
jmp 0x40d298
cmp cl, 4
jne 0x40d21c
mov eax, dword [esi + 0x10]
push edi
push 0
call eax
add esp, 8
jmp 0x40d222
mov eax, dword [esi + 0xc]
add eax, 2
push eax
push dword [0x4e687c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
add esp, 8
test eax, eax
jne 0x40d266
push edi
push 0x4cebc0
mov ecx, 0x4e8b78
call fcn.00448ad0
cmp dword [0x4e82ec], ebx
je 0x40d25a
push dword [0x4e8b60]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 0x4bac30
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [esi + 0x17]
mov dword [0x4e687c], eax
test cl, cl
jne 0x40d27d
mov ecx, dword [esi + 0xc]
push eax
call fcn.004a1e10
jmp 0x40d29b
cmp cl, 1
jne 0x40d28c
push eax
mov ecx, esi
call fcn.004a1e10
jmp 0x40d29b
cmp cl, 4
jne 0x40d29b
push edi
push eax
mov eax, dword [esi + 0x10]
call eax
add esp, 8
cmp dword [0x4e82ec], ebx
je 0x40d2af
push dword [0x4e8b60]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x4e687c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret