Function at 0x402e94
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push ecx
push edx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x14], ebx
call fcn.00401418
cmp dword [0x407f4c], 0
je 0x402eb9
cmp eax, 4
jb 0x402eb9
shr eax, 1
mov dword [ebp - 0x20], eax
push 0
push 0
push dword [0x408084]
call fcn.00402ce8
mov ebx, eax
test ebx, ebx
jne 0x402ed6
jmp 0x4030a8
lea eax, [ebx*2]
push eax
call fcn.00401fa8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x402ef1
jmp 0x4030a8
push dword [ebp - 0x14]
push ebx
push dword [0x408084]
call fcn.00402ce8
mov ebx, eax
test ebx, ebx
jne 0x402f0b
jmp 0x4030a8
shr ebx, 2
lea eax, [ebx*4]
push eax
call fcn.00401fa8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x402f29
jmp 0x4030a8
lea eax, [ebx*4]
push eax
call fcn.00401fa8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x402f44
jmp 0x4030a8
mov dword [0x407f18], 0
mov dword [0x407f1c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
push esi
push dword [0x408084]
call fcn.00402da8
cmp eax, 3
je 0x402f82
cmp eax, 2
jne 0x402fe1
push esi
call fcn.004020c4
mov dword [ebp - 0x10], eax
push 0
push 0
push dword [ebp - 0x10]
push fcn.00403cec
push 0
push 0
call sub.KERNEL32.dll_CreateThread
test eax, eax
je 0x402fdf
mov ecx, dword [ebp - 8]
lea ecx, [edi + ecx*4]
mov dword [ecx], eax
inc dword [ebp - 8]
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0xc], eax
jne 0x402fdf
push 0xffffffffffffffff
push 0
push dword [ebp - 0x18]
push dword [ebp - 0xc]
call sub.KERNEL32.dll_WaitForMultipleObjects
mov dword [ebp - 8], eax
mov ecx, dword [edi + eax*4]
mov dword [edi + eax*4], 0
push ecx
call sub.ntdll.dll_NtClose
dec dword [ebp - 0xc]
jmp 0x403043
cmp eax, 4
jne 0x403043
push esi
call fcn.004020c4
mov dword [ebp - 0x10], eax
push 0
push 4
push dword [ebp - 0x10]
push fcn.00403cec
push 0
push 0
call sub.KERNEL32.dll_CreateThread
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x403043
push dword [ebp - 4]
push dword [0x408084]
call fcn.00402b8c
test eax, eax
jne 0x403033
push 0
push dword [ebp - 4]
call sub.ntdll.dll_NtTerminateThread
push dword [ebp - 4]
call sub.ntdll.dll_NtClose
jmp 0x403043
push dword [ebp - 4]
call sub.KERNEL32.dll_ResumeThread
mov eax, dword [ebp - 4]
jmp 0x402fa4
add esi, 8
dec ebx
test ebx, ebx
jne 0x402f6c
cmp dword [ebp - 0xc], 0
je 0x40308a
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
lodsd eax, dword [esi]
test eax, eax
je 0x403065
stosd dword es:[edi], eax
dec ebx
test ebx, ebx
jne 0x40305e
push 0xffffffffffffffff
push 1
push dword [ebp - 0x1c]
push dword [ebp - 0xc]
call sub.KERNEL32.dll_WaitForMultipleObjects
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x1c]
lodsd eax, dword [esi]
push eax
call sub.ntdll.dll_NtClose
dec ebx
test ebx, ebx
jne 0x40307e
lea ecx, [0x407f1c]
mov eax, dword [0x407f18]
mov edx, eax
lock cmpxchg dword [ecx], edx
jne 0x40309f
jmp 0x4030a8
push 0x64
call sub.KERNEL32.dll_Sleep
jmp 0x40308a
cmp dword [ebp - 0x1c], 0
je 0x4030b6
push dword [ebp - 0x1c]
call fcn.00401fe4
cmp dword [ebp - 0x18], 0
je 0x4030c4
push dword [ebp - 0x18]
call fcn.00401fe4
cmp dword [ebp - 0x14], 0
je 0x4030d2
push dword [ebp - 0x14]
call fcn.00401fe4
pop edi
pop esi
pop edx
pop ecx
pop ebx
mov esp, ebp
pop ebp
ret