Function at 0x40ef50
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x24], 0xffffffff
mov eax, dword [0x4854b8]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x40ef84
cmp dword [ebp - 0x48], 1
je 0x40f14a
cmp dword [ebp - 0x48], 2
je 0x40f171
jmp 0x40f196
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], fcn.0040f1a0
push 0
push 0
lea eax, [ebp - 0x20]
push eax
push 0x40ef10
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], fcn.0040f720
push 0
push 0
lea eax, [ebp - 0x44]
push eax
push 0x40ef10
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x44], eax
mov ecx, 1
test ecx, ecx
je 0x40f0d6
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40f03d
cmp dword [ebp - 0x1c], 0x103
je 0x40f03d
cmp dword [ebp - 4], 0xffffffff
je 0x40f03d
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x24], ecx
mov dword [0x4854b8], 1
jmp 0x40f0d6
lea edx, [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40f070
cmp dword [ebp - 0x40], 0x103
je 0x40f070
cmp dword [ebp - 0x28], 0xffffffff
je 0x40f070
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x24], ecx
mov dword [0x4854b8], 2
jmp 0x40f0d6
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40f0b4
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40f0b4
cmp dword [ebp - 0x1c], 0x103
je 0x40f0b4
cmp dword [ebp - 0x40], 0x103
je 0x40f0b4
cmp dword [ebp - 4], 0xffffffff
jne 0x40f0b4
cmp dword [ebp - 0x28], 0xffffffff
jne 0x40f0b4
jmp 0x40f0d6
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov dword [ebp - 0x30], eax
call fcn.004353c0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40effa
mov ecx, 1
test ecx, ecx
je 0x40f148
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40f12b
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40f12b
cmp dword [ebp - 0x1c], 0x103
je 0x40f12b
cmp dword [ebp - 0x40], 0x103
je 0x40f12b
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f148
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x30], 1
call fcn.004353c0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40f0d6
jmp 0x40f196
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040f1a0
add esp, 0x10
mov dword [ebp - 0x24], eax
mov dword [0x4854b8], 1
jmp 0x40f196
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040f720
add esp, 0x10
mov dword [ebp - 0x24], eax
mov dword [0x4854b8], 2
mov eax, dword [ebp - 0x24]
mov esp, ebp
pop ebp
ret