Function at 0x407e60
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48bc9c
mov eax, dword fs:[0]
push eax
sub esp, 0x110
mov eax, dword [0x4c7084]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
test ecx, ecx
jne 0x407e99
xor eax, eax
jmp 0x408399
push ecx
lea ecx, [ebp - 0x104]
call fcn.00408c40
mov dword [ebp - 4], 0
lea eax, [ebp - 0xf0]
push 0xfde9
push dword [ebp - 0x104]
lea ecx, [ebp - 0xf4]
mov dword [ebp - 0xf4], eax
call fcn.00409b20
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0xf4]
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
cmp byte [edx], 0
jne 0x407ef3
xor ecx, ecx
jmp 0x407f01
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407ef8
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00409360
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xf0]
mov eax, dword [ebp - 0xf4]
cmp eax, ecx
je 0x407f28
push eax
call fcn.004671f7
add esp, 4
cmp dword [ebp - 0x30], 3
ja 0x407f35
xor edi, edi
jmp 0x40834b
cmp dword [ebp - 0x2c], 0x10
lea eax, [ebp - 0x40]
mov bl, 1
cmovae eax, dword [ebp - 0x40]
sub esp, 0x18
add eax, 3
mov ecx, esp
push eax
call fcn.004088d0
mov dl, bl
lea ecx, [ebp - 0x70]
call fcn.004132e0
add esp, 0x18
cmp dword [ebp - 0x60], 0
jne 0x407f6a
xor edi, edi
jmp 0x408324
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x114], 0
lea edx, [ebp - 0x11c]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x70]
call fcn.00407040
test al, al
jne 0x407fa5
xor edi, edi
jmp 0x408319
mov esi, dword [ebp - 0x11c]
lea ecx, [ebp - 0x58]
push 0xffffffffffffffff
push 0
mov dword [ebp - 0x44], 0xf
lea eax, [esi + 4]
mov dword [ebp - 0x48], 0
push eax
mov byte [ebp - 0x58], 0
call fcn.00409460
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x28]
mov ebx, dword [esi]
push 0x4a5cf6
mov dword [ebp - 0x100], ebx
call fcn.004088d0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 7
push eax
push 1
push 1
mov edx, ebx
lea ecx, [ebp - 0x58]
call fcn.00403400
add esp, 0xc
lea ecx, [ebp - 0x28]
call fcn.00408790
call fcn.00406330
xor eax, eax
mov edi, 1
xor ebx, ebx
mov dword [ebp - 0xf8], edi
xor esi, esi
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0x108], eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x11c]
cmp eax, dword [ebp - 0x118]
je 0x4081c4
lea esi, [eax + 0x7c]
nop
mov byte [esi + 8], 0
mov bl, 1
cmp dword [esi - 0x20], 0
jne 0x408069
xor edi, edi
mov dword [ebp - 0xf8], edi
jmp 0x408191
cmp dword [esi], 2
push 0
push 0
jne 0x4080cc
lea edi, [esi - 0x7c]
push edi
push 0x407a10
push 0
push 0
call fcn.0046b386
add esp, 0x18
mov dword [ebp - 0xfc], eax
test eax, eax
je 0x4080ad
cmp eax, 0xffffffff
je 0x4080ad
lea eax, [ebp - 0xfc]
push eax
lea ecx, [ebp - 0x110]
call fcn.004083f0
jmp 0x408191
mov edx, dword [edi]
lea eax, [esi - 0x60]
push 4
push eax
lea ecx, [esi - 0x78]
call fcn.004051d0
mov dword [ebp - 0xf8], 0
jmp 0x40818e
lea eax, [esi - 0x7c]
push eax
push 0x407a10
push 0
push 0
call fcn.0046b386
mov edi, eax
add esp, 0x18
test edi, edi
je 0x40817d
cmp edi, 0xffffffff
je 0x40817d
push 0x2dc6c0
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, eax
xor eax, eax
cmp byte [esi + 8], al
cmovne eax, dword [ebp - 0xf8]
mov dword [ebp - 0xf8], eax
cmp ecx, 0x102
jne 0x40812d
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
cmp dword [esi], 3
setne bl
jmp 0x408170
test ecx, ecx
jne 0x408165
cmp dword [esi], 3
jne 0x408170
lea eax, [ebp - 0xfc]
mov dword [ebp - 0xfc], ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp byte [esi + 8], 0
je 0x408161
test eax, eax
je 0x408161
cmp dword [ebp - 0xfc], 0
je 0x408161
mov bl, 1
jmp 0x408170
xor bl, bl
jmp 0x408170
xor eax, eax
movzx ebx, bl
cmp dword [esi], 3
cmove ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x4081a6
jmp 0x408191
mov edx, dword [esi - 0x7c]
lea eax, [esi - 0x60]
push 4
push eax
lea ecx, [esi - 0x78]
call fcn.004051d0
add esp, 8
add esi, 0x88
lea eax, [esi - 0x7c]
cmp eax, dword [ebp - 0x118]
jne 0x408050
mov eax, dword [ebp - 0x108]
mov ebx, dword [ebp - 0x110]
mov edi, dword [ebp - 0xf8]
mov esi, dword [ebp - 0x10c]
mov dword [ebp - 0xfc], eax
push 0
push 0x4a5cf6
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.00409360
mov edx, dword [ebp - 0x100]
lea eax, [ebp - 0x28]
push eax
push edi
push 2
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 9
call fcn.00403400
mov byte [ebp - 4], 8
add esp, 0xc
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x40821a
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00409fe0
push 0
push 0x4a5cf6
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.00409360
mov edx, dword [ebp - 0x100]
lea eax, [ebp - 0x28]
push eax
push edi
push 3
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0xa
call fcn.00403400
mov eax, dword [ebp - 0x14]
add esp, 0xc
cmp eax, 0x10
jb 0x40826c
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00409fe0
cmp ebx, esi
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
sete al
mov byte [ebp - 0x28], 0
test al, al
jne 0x4082dc
push 0xffffffffffffffff
sub esi, ebx
push 1
mov eax, esi
sar eax, 2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
lea eax, [esi + 3]
xor ecx, ecx
shr eax, 2
xor edi, edi
cmp ebx, dword [ebp - 0x10c]
mov esi, ebx
cmova eax, ecx
mov dword [ebp - 0x100], eax
test eax, eax
je 0x4082d6
mov ebx, eax
nop dword [eax + eax]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
lea esi, [esi + 4]
cmp edi, ebx
jne 0x4082c0
mov ebx, dword [ebp - 0x110]
mov edi, dword [ebp - 0xf8]
test ebx, ebx
je 0x4082f2
mov eax, dword [ebp - 0xfc]
sub eax, ebx
sar eax, 2
push eax
push ebx
call fcn.00409cd0
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jb 0x408307
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00409fe0
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
lea ecx, [ebp - 0x11c]
call fcn.00408f20
mov eax, dword [ebp - 0x5c]
cmp eax, 0x10
jb 0x408339
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00409fe0
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], 0
mov byte [ebp - 0x70], 0
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x408360
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00409fe0
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov esi, dword [ebp - 0x104]
mov dword [ebp - 0x2c], 0xf
add esi, 0xfffffff0
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408397
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044b43a
mov esp, ebp
pop ebp
ret