Function at 0x405b2f
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.00405630
mov dword [0x411898], eax
cmp dword [0x411898], 0
jne 0x405b6e
mov dword [ebp - 0xc], 3
jmp 0x405d77
mov eax, dword [0x411898]
cmp dword [eax + 0x14], 0
jne 0x405b8a
mov dword [ebp - 0xc], 2
jmp 0x405d77
mov eax, dword [0x411898]
mov eax, dword [eax + 0x10]
mov dword [0x411894], eax
mov eax, dword [0x411898]
cmp dword [eax + 0xc], 1
jne 0x405bc5
cmp dword [0x410f2c], 5
jne 0x405bb4
cmp dword [0x410f30], 2
je 0x405bc5
mov dword [ebp - 0xc], 2
jmp 0x405d77
cmp dword [0x4118d0], 0
jne 0x405be2
mov dword [0x4118d0], 1
call fcn.00405a8e
mov dword [0x4118d4], eax
mov eax, dword [0x411898]
add eax, 0x24
mov dword [ebp - 8], eax
push 0
mov eax, dword [0x411898]
push dword [eax + 4]
mov eax, dword [0x411898]
push dword [eax + 8]
push dword [ebp - 8]
call fcn.004022d2
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [0x41188c], eax
and dword [0x41189c], 0
mov eax, dword [0x411898]
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 0x405c3f
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [0x411898]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x20]
jae 0x405cb2
push 2
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add eax, 0xac
push eax
call fcn.00409377
cmp eax, 1
jne 0x405ca5
and dword [ebp - 0x18], 0
jmp 0x405c71
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 0x405ca5
push 0
push 0
push dword [ebp - 0x10]
push 0x405923
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push dword [0x41188c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x405c6a
mov eax, dword [ebp - 0x10]
add eax, 0xb0
mov dword [ebp - 0x10], eax
jmp 0x405c38
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
and dword [ebp - 0x1c], 0
jmp 0x405cc5
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [0x411898]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [eax + 0x1c]
jae 0x405d77
and dword [ebp - 0x20], 0
push 2
push dword [ebp - 4]
lea eax, [ebp - 0x20]
push eax
call fcn.00409377
cmp eax, 1
jne 0x405d69
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 0x405d22
push 0
push 0
push dword [ebp - 4]
push 0x40573f
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push dword [0x41188c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [0x4118d4], 1
jne 0x405d69
and dword [ebp - 0x24], 0
jmp 0x405d38
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 0x405d69
push 0
push 0
push dword [ebp - 4]
push 0x40523c
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push dword [0x41188c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x405d31
mov eax, dword [ebp - 4]
add eax, 0x50
mov dword [ebp - 4], eax
jmp 0x405cbe
cmp dword [0x41188c], 0
je 0x405d8c
push dword [0x41188c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0xc]
leave
ret 4