Function at 0x40b722
Capabilities:
Create thread

Disassembly:
push ebp
sub esp, 0x800
lea ebp, [esp - 4]
mov eax, dword [0x486ba4]
xor eax, ebp
mov dword [ebp + 0x800], eax
push 0x18
mov eax, 0x46e2c1
call fcn.00450ec5
mov eax, dword [ebp + 0x80c]
mov edi, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [edi + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x810]
xor ebx, ebx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x18], eax
cmp ecx, ebx
je 0x40b9bb
cmp ecx, 0xffffffff
je 0x40b9a8
cmp eax, ebx
je 0x40b9b1
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x40b781
sub eax, esi
sar eax, 1
cmp eax, 1
jb 0x40b9b1
cmp dword [ebp + 0x814], ebx
jle 0x40b9b1
push dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push eax
call fcn.00402676
lea eax, [ebp - 0x14]
mov esi, 0x478d3c
push eax
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.00404069
test eax, eax
jne 0x40b7d7
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.004026f8
jmp 0x40b9bb
push dword [ebp - 0x18]
lea eax, [edi + 0x3c]
push eax
call fcn.00402658
cmp dword [ebp - 0x10], ebx
je 0x40b7eb
mov esi, dword [ebp - 0x10]
push esi
lea eax, [edi + 0x40]
push eax
call fcn.00402658
mov eax, dword [ebp + 0x818]
mov dword [edi + 0x30], eax
mov eax, dword [0x489144]
mov esi, 0x489144
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
mov eax, dword [0x489144]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
xor eax, eax
mov byte [ebp - 4], 2
push 0x7fe
mov word [ebp], ax
lea eax, [ebp + 2]
push ebx
push eax
mov dword [ebp - 0x18], ebx
call fcn.00450fd0
mov eax, dword [ebp - 0x14]
add esp, 0xc
push dword [eax - 0xc]
lea esi, [ebp - 0x14]
call fcn.00402561
lea esi, [ebp]
mov ecx, eax
call fcn.00413331
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x10]
mov ecx, esi
call fcn.00406a10
pop ecx
pop ecx
test eax, eax
jne 0x40b8b6
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x40b88c
cmp eax, 0xffffffff
je 0x40b88c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], ebx
xor edi, edi
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.004026f8
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004026f8
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.004026f8
mov eax, edi
jmp 0x40b9bd
lea eax, [ebp]
push eax
lea eax, [edi + 0x48]
push eax
call fcn.00402658
xor ebx, ebx
inc ebx
call fcn.0040b9e2
xor esi, esi
mov dword [edi + 0x54], eax
cmp eax, esi
jne 0x40b900
mov eax, dword [edi + 8]
cmp eax, esi
je 0x40b8ea
cmp eax, 0xffffffff
je 0x40b8ea
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], esi
lea eax, [ebp - 0x18]
push eax
mov ecx, edi
mov dword [ebp - 0x18], 5
call fcn.0040c6b1
mov edi, eax
jmp 0x40b88e
mov ecx, dword [edi + 0xa0]
push esi
mov dword [eax + 0x10], ecx
mov eax, dword [edi + 0x54]
push esi
call fcn.0040626e
mov eax, dword [edi + 0x54]
mov dword [eax + 0xc], edi
mov edi, dword [edi + 0x54]
lea eax, [ebp]
push eax
call fcn.004064a3
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 0x54]
mov ecx, dword [esi + 0xa4]
mov dword [eax + 0x120], ecx
lea eax, [ebp - 0x20]
push eax
xor edi, edi
push edi
push esi
push 0x40b530
push 0xa00000
push edi
mov dword [ebp - 0x20], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x34], eax
cmp eax, edi
je 0x40b985
cmp eax, 0xffffffff
je 0x40b985
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.004026f8
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004026f8
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.004026f8
xor eax, eax
inc eax
jmp 0x40b9bd
mov eax, dword [esi + 8]
cmp eax, edi
je 0x40b88e
cmp eax, 0xffffffff
je 0x40b88e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], edi
jmp 0x40b88e
cmp ecx, ebx
je 0x40b9bb
cmp ecx, 0xffffffff
je 0x40b9bb
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], ebx
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.0044bafb
add ebp, 0x804
leave
ret 0x10