Function at 0x408ce0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
push ebx
push 0x408bd0
push ebx
push ebx
xor esi, esi
call fcn.0041b736
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x18
push eax
call edi
call fcn.00406840
xor ecx, ecx
sub eax, ecx
je 0x408f9c
dec eax
jne 0x409182
cmp esi, ecx
jne 0x408e4e
mov eax, dword [0x465830]
mov dword [0x4655e8], ecx
mov dword [ebp - 4], ecx
mov ecx, dword [0x465834]
cmp eax, ecx
je 0x408d5c
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465834]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465834], esi
mov eax, dword [0x465840]
mov ecx, dword [0x465844]
cmp eax, ecx
je 0x408d8b
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465844]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465844], esi
mov ecx, dword [0x465824]
mov edi, dword [0x465820]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor esi, esi
add eax, edx
je 0x408de8
xor ebx, ebx
lea ecx, [ebx + edi]
mov edi, 0x465830
call fcn.00409210
mov ecx, dword [0x465824]
mov edi, dword [0x465820]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc esi
add ecx, edx
add ebx, 0x1c
cmp esi, ecx
jb 0x408db2
mov ecx, dword [0x465854]
mov edi, dword [0x465850]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor esi, esi
add eax, edx
je 0x409166
xor ebx, ebx
lea ecx, [ebx + edi]
mov edi, 0x465840
call fcn.00409210
mov ecx, dword [0x465854]
mov edi, dword [0x465850]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc esi
add ecx, edx
add ebx, 0x1c
cmp esi, ecx
jb 0x408e13
jmp 0x409166
cmp ebx, ecx
je 0x409182
push 0x1388
push esi
mov dword [0x4655e8], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call edi
mov eax, dword [0x465830]
mov ecx, dword [0x465834]
cmp eax, ecx
je 0x408e9e
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465834]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465834], esi
mov eax, dword [0x465840]
mov ecx, dword [0x465844]
cmp eax, ecx
je 0x408ecd
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465844]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465844], esi
mov ecx, dword [0x465824]
mov edi, dword [0x465820]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
xor esi, esi
shr eax, 0x1f
add eax, edx
mov dword [0x4655e8], esi
mov dword [ebp - 4], esi
je 0x408f36
xor ebx, ebx
lea ecx, [ecx]
lea ecx, [ebx + edi]
mov edi, 0x465830
call fcn.00409210
mov ecx, dword [0x465824]
mov edi, dword [0x465820]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc esi
add ecx, edx
add ebx, 0x1c
cmp esi, ecx
jb 0x408f00
mov ecx, dword [0x465854]
mov edi, dword [0x465850]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor esi, esi
add eax, edx
je 0x409166
xor ebx, ebx
lea ecx, [ebx + edi]
mov edi, 0x465840
call fcn.00409210
mov ecx, dword [0x465854]
mov edi, dword [0x465850]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc esi
add ecx, edx
add ebx, 0x1c
cmp esi, ecx
jb 0x408f61
jmp 0x409166
cmp esi, ecx
je 0x409027
cmp ebx, ecx
jne 0x409182
push 0x1388
push esi
mov dword [0x4655e8], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call edi
mov eax, dword [0x465830]
mov ecx, dword [0x465834]
cmp eax, ecx
je 0x408ff4
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465834]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465834], esi
mov eax, dword [0x465840]
mov ecx, dword [0x465844]
cmp eax, ecx
je 0x409023
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465844]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465844], esi
xor esi, esi
jmp 0x40902f
cmp ebx, ecx
jne 0x409182
call fcn.00408b10
test eax, eax
je 0x409182
mov eax, dword [0x465830]
mov ecx, dword [0x465834]
mov dword [ebp - 4], 1
mov dword [0x4655e8], 0
cmp eax, ecx
je 0x40907c
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465834]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465834], esi
mov eax, dword [0x465840]
mov ecx, dword [0x465844]
cmp eax, ecx
je 0x4090ab
mov edx, dword [ebp - 4]
push edx
push ecx
call fcn.00407530
mov edi, dword [0x465844]
add esp, 8
mov esi, eax
call fcn.00407420
mov dword [0x465844], esi
mov ecx, dword [0x465824]
mov edi, dword [0x465820]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor esi, esi
add eax, edx
je 0x409108
xor ebx, ebx
lea ecx, [ebx + edi]
mov edi, 0x465830
call fcn.00409210
mov ecx, dword [0x465824]
mov edi, dword [0x465820]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc esi
add ecx, edx
add ebx, 0x1c
cmp esi, ecx
jb 0x4090d2
mov ecx, dword [0x465854]
mov edi, dword [0x465850]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
xor esi, esi
add eax, edx
je 0x409166
xor ebx, ebx
nop
lea ecx, [ebx + edi]
mov edi, 0x465840
call fcn.00409210
mov ecx, dword [0x465854]
mov edi, dword [0x465850]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc esi
add ecx, edx
add ebx, 0x1c
cmp esi, ecx
jb 0x409130
push 0
push 0
push 0
push 0x408750
push 0
push 0
call fcn.0041b736
mov ebx, dword [ebp - 4]
add esp, 0x18
mov esi, eax
push 0x6ddd00
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x408d06