Function at 0x40747c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 8
dec ecx
push 0
push 0
jne 0x407485
xchg dword [ebp - 4], ecx
push ebx
push esi
mov ebx, eax
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call fcn.004040ec
push ebp
xor eax, eax
push 0x4079b2
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.00403e18
lea eax, [ebp - 0xc]
call fcn.00403d80
jmp 0x407975
lea eax, [ebp - 0xc]
call fcn.00403d80
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x4079c8
call fcn.00404240
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.0040415c
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
call fcn.00406df8
mov edx, dword [ebp - 0x1c]
mov eax, 0x4079d4
call fcn.00404240
test eax, eax
jle 0x407572
lea eax, [ebp - 0x10]
push eax
mov edx, dword [ebp - 0xc]
mov eax, 0x4079d4
call fcn.00404240
push eax
mov eax, dword [ebp - 0xc]
call fcn.00403f04
mov ecx, eax
mov eax, dword [ebp - 0xc]
pop edx
call fcn.0040415c
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, 2
call fcn.0040419c
lea edx, [ebp - 0x10]
mov ecx, 2
mov eax, 0x4079e4
call fcn.004041e4
lea eax, [ebp - 0x10]
mov edx, 0x4079c8
call fcn.00403f0c
mov edx, dword [ebx + 0x8e60]
mov eax, dword [ebp - 0x10]
call fcn.00406b00
jmp 0x407942
mov edx, dword [ebp - 0xc]
mov eax, 0x4079f0
call fcn.00404240
or eax, eax
jle 0x40774a
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0xc]
call fcn.00403e18
lea eax, [ebx + 0x8e70]
call fcn.00403d80
cmp dword [ebx + 0x8e78], 0x14
jge 0x407942
mov edx, dword [ebp - 0x18]
mov eax, 0x4079f0
call fcn.00404240
or eax, eax
jne 0x4075c3
lea eax, [ebp - 0x18]
call fcn.00403d80
cmp dword [ebp - 0x18], 0
je 0x407942
lea eax, [ebp - 8]
call fcn.00403d80
lea eax, [ebp - 8]
mov edx, dword [ebp - 0x18]
call fcn.00403e18
lea eax, [ebp - 8]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x407a00
call fcn.00404240
push eax
mov eax, dword [ebp - 8]
call fcn.00403f04
mov ecx, eax
mov eax, dword [ebp - 8]
pop edx
call fcn.0040415c
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x407a0c
call fcn.00404240
inc eax
push eax
mov eax, dword [ebp - 8]
call fcn.00403f04
mov ecx, eax
mov eax, dword [ebp - 8]
pop edx
call fcn.0040415c
lea eax, [ebp - 0xc]
push eax
mov edx, dword [ebp - 0xc]
mov eax, 0x407a0c
call fcn.00404240
mov ecx, eax
dec ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.0040415c
mov eax, dword [ebp - 0xc]
call fcn.004068b8
mov esi, eax
mov edx, dword [ebp - 8]
mov eax, 0x407a0c
call fcn.00404240
or eax, eax
jle 0x407688
lea eax, [ebp - 8]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x407a0c
call fcn.00404240
mov ecx, eax
mov edx, 1
mov eax, dword [ebp - 8]
dec ecx
call fcn.0040415c
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 8]
call fcn.0040687c
mov edx, dword [ebp - 0x20]
mov eax, 0x407a18
call fcn.00404240
test eax, eax
jg 0x4076c4
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x24]
call fcn.0040687c
mov edx, dword [ebp - 0x24]
mov eax, 0x407a28
call fcn.00404240
test eax, eax
jle 0x407942
cmp esi, 0x32
jle 0x407942
push dword [ebx + 0x8e74]
push dword [ebp - 8]
push 0x407a34
lea eax, [ebx + 0x8e74]
mov edx, 3
call fcn.00403fc4
push dword [0x40ff3c]
push dword [ebp - 8]
push 0x407a34
mov eax, 0x40ff3c
mov edx, 3
call fcn.00403fc4
call fcn.00402798
push 0x407a40
push dword [ebp - 8]
push 0x4079c8
lea eax, [ebp - 8]
mov edx, 3
call fcn.00403fc4
mov edx, dword [ebx + 0x8e60]
mov eax, dword [ebp - 8]
call fcn.00406b00
inc dword [ebx + 0x8e78]
push 0x4b0
call sub.kernel32.dll_Sleep
jmp 0x407942
lea eax, [ebp - 0x28]
push eax
mov edx, dword [ebp - 8]
mov eax, 0x407a0c
call fcn.00404240
mov edx, eax
inc edx
mov ecx, 3
mov eax, dword [ebp - 0xc]
call fcn.0040415c
mov eax, dword [ebp - 0x28]
mov edx, 0x407a50
call fcn.00404048
je 0x407942
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x2c]
call fcn.0040687c
mov edx, dword [ebp - 0x2c]
mov eax, 0x407a5c
call fcn.00404240
test eax, eax
jle 0x40781e
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 0xc]
call fcn.0040687c
mov edx, dword [ebp - 0x30]
mov eax, 0x407a6c
call fcn.00404240
or eax, eax
jne 0x407942
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0xc]
call fcn.0040687c
mov edx, dword [ebp - 0x34]
mov eax, 0x407a8c
call fcn.00404240
or eax, eax
jne 0x407942
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 0xc]
call fcn.0040659c
mov edx, dword [ebp - 0x38]
mov eax, dword [0x40ea0c]
call fcn.00403dd4
mov eax, dword [0x40e9f4]
mov edx, dword [ebx + 0x8e60]
mov dword [eax], edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x406f04
push 0
push 0
call sub.kernel32.dll_CreateThread_1
jmp 0x407942
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
call fcn.0040687c
mov edx, dword [ebp - 0x3c]
mov eax, 0x407ab0
call fcn.00404240
or eax, eax
jle 0x4078ca
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 0xc]
call fcn.0040659c
mov edx, dword [ebp - 0x40]
mov eax, dword [0x40ea0c]
call fcn.00403dd4
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 0xc]
call fcn.0040660c
mov edx, dword [ebp - 0x44]
mov eax, dword [0x40e9f8]
call fcn.00403dd4
mov eax, dword [0x40e9f8]
push eax
mov edx, dword [0x40e9f8]
mov edx, dword [edx]
mov eax, 0x407ab0
call fcn.00404240
sub eax, 0xfffffff6
push eax
mov eax, dword [0x40e9f8]
mov eax, dword [eax]
call fcn.00403f04
mov ecx, eax
mov eax, dword [0x40e9f8]
mov eax, dword [eax]
pop edx
call fcn.0040415c
mov eax, dword [0x40e9f4]
mov edx, dword [ebx + 0x8e60]
mov dword [eax], edx
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x406fac
push 0
push 0
call sub.kernel32.dll_CreateThread_1
jmp 0x407942
mov edx, dword [ebp - 0xc]
mov eax, 0x407ac4
call fcn.00404240
or eax, eax
jle 0x407942
mov edx, dword [ebx + 0x8e74]
mov eax, 0x407ad4
call fcn.00404240
test eax, eax
jne 0x407942
lea eax, [ebx + 0x8e74]
mov edx, 0x407ae8
call fcn.00403f0c
mov edx, dword [0x40ff3c]
mov eax, 0x407ad4
call fcn.00404240
or eax, eax
jne 0x407922
mov eax, 0x40ff3c
mov edx, 0x407ae8
call fcn.00403f0c
call fcn.00402798
lea eax, [ebp - 0x10]
mov edx, 0x407b00
call fcn.00403e18
mov eax, dword [ebp - 0x10]
mov edx, dword [ebx + 0x8e60]
call fcn.00406b00
lea eax, [ebp - 4]
push eax
mov edx, dword [ebp - 4]
mov eax, 0x4079c8
call fcn.00404240
sub eax, 0xfffffffe
push eax
mov eax, dword [ebp - 4]
call fcn.00403f04
mov ecx, eax
mov eax, dword [ebp - 4]
pop edx
call fcn.0040415c
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.00403e18
mov edx, dword [ebp - 8]
mov eax, 0x4079c8
call fcn.00404240
test eax, eax
jg 0x4074c4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4079b9
mov edx, 0xc
lea eax, [ebp - 0x44]
call fcn.00403da4
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.00403da4
ret