Function at 0x405cf8
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
and dword [ebp - 8], 0
and dword [ebp - 4], 0
and dword [ebp - 0x10], 0
and dword [ebp - 0xc], 0
push 1
push dword [ebp + 8]
call fcn.004057f9
mov dword [0x413d64], eax
cmp dword [0x413d64], 0
jne 0x405d37
mov dword [ebp - 0xc], 3
jmp 0x405f40
mov eax, dword [0x413d64]
cmp dword [eax + 0x14], 0
jne 0x405d53
mov dword [ebp - 0xc], 2
jmp 0x405f40
mov eax, dword [0x413d64]
mov eax, dword [eax + 0x10]
mov dword [0x413d60], eax
mov eax, dword [0x413d64]
cmp dword [eax + 0xc], 1
jne 0x405d8e
cmp dword [0x4131dc], 5
jne 0x405d7d
cmp dword [0x4131e0], 2
je 0x405d8e
mov dword [ebp - 0xc], 2
jmp 0x405f40
cmp dword [0x413db8], 0
jne 0x405dab
mov dword [0x413db8], 1
call fcn.00405c57
mov dword [0x413dbc], eax
mov eax, dword [0x413d64]
add eax, 0x24
mov dword [ebp - 8], eax
push 0
mov eax, dword [0x413d64]
push dword [eax + 4]
mov eax, dword [0x413d64]
push dword [eax + 8]
push dword [ebp - 8]
call fcn.00402327
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x413d58], eax
and dword [0x413d68], 0
mov eax, dword [0x413d64]
mov eax, dword [eax + 0x1c]
imul eax, eax, 0x50
add eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
and dword [ebp - 0x14], 0
jmp 0x405e08
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [0x413d64]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x20]
jae 0x405e7b
push 2
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add eax, 0xac
push eax
call fcn.0040a078
cmp eax, 1
jne 0x405e6e
and dword [ebp - 0x18], 0
jmp 0x405e3a
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [eax + 0xa8]
jae 0x405e6e
push 0
push 0
push dword [ebp - 0x10]
push 0x405aec
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push dword [0x413d58]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x405e33
mov eax, dword [ebp - 0x10]
add eax, 0xb0
mov dword [ebp - 0x10], eax
jmp 0x405e01
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
and dword [ebp - 0x1c], 0
jmp 0x405e8e
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [0x413d64]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [eax + 0x1c]
jae 0x405f40
and dword [ebp - 0x20], 0
push 2
push dword [ebp - 4]
lea eax, [ebp - 0x20]
push eax
call fcn.0040a078
cmp eax, 1
jne 0x405f32
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x44], 0
je 0x405eeb
push 0
push 0
push dword [ebp - 4]
push 0x405908
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push dword [0x413d58]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [0x413dbc], 1
jne 0x405f32
and dword [ebp - 0x24], 0
jmp 0x405f01
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [eax + 0x48]
jae 0x405f32
push 0
push 0
push dword [ebp - 4]
push 0x4053fa
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push dword [0x413d58]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x405efa
mov eax, dword [ebp - 4]
add eax, 0x50
mov dword [ebp - 4], eax
jmp 0x405e87
cmp dword [0x413d58], 0
je 0x405f55
push dword [0x413d58]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
leave
ret 4