Function at 0x40b6d9
Capabilities:
Create thread

Disassembly:
push ebp
sub esp, 0x800
lea ebp, [esp - 4]
mov eax, dword [0x487ba4]
xor eax, ebp
mov dword [ebp + 0x800], eax
push 0x18
mov eax, 0x46ea2f
call fcn.00451557
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 0x40b972
cmp ecx, 0xffffffff
je 0x40b95f
cmp eax, ebx
je 0x40b968
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x40b738
sub eax, esi
sar eax, 1
cmp eax, 1
jb 0x40b968
cmp dword [ebp + 0x814], ebx
jle 0x40b968
push dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push eax
call fcn.0040266c
lea eax, [ebp - 0x14]
mov esi, 0x479d3c
push eax
mov ecx, esi
mov dword [ebp - 4], ebx
call fcn.0040405f
test eax, eax
jne 0x40b78e
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.004026ee
jmp 0x40b972
push dword [ebp - 0x18]
lea eax, [edi + 0x3c]
push eax
call fcn.0040264e
cmp dword [ebp - 0x10], ebx
je 0x40b7a2
mov esi, dword [ebp - 0x10]
push esi
lea eax, [edi + 0x40]
push eax
call fcn.0040264e
mov eax, dword [ebp + 0x818]
mov dword [edi + 0x30], eax
mov eax, dword [0x48a144]
mov esi, 0x48a144
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
mov eax, dword [0x48a144]
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.00451670
mov eax, dword [ebp - 0x14]
add esp, 0xc
push dword [eax - 0xc]
lea esi, [ebp - 0x14]
call fcn.00402557
lea esi, [ebp]
mov ecx, eax
call fcn.004132fb
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x10]
mov ecx, esi
call fcn.00406a09
pop ecx
pop ecx
test eax, eax
jne 0x40b86d
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x40b843
cmp eax, 0xffffffff
je 0x40b843
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.004026ee
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004026ee
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.004026ee
mov eax, edi
jmp 0x40b974
lea eax, [ebp]
push eax
lea eax, [edi + 0x48]
push eax
call fcn.0040264e
xor ebx, ebx
inc ebx
call fcn.0040b999
xor esi, esi
mov dword [edi + 0x54], eax
cmp eax, esi
jne 0x40b8b7
mov eax, dword [edi + 8]
cmp eax, esi
je 0x40b8a1
cmp eax, 0xffffffff
je 0x40b8a1
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.0040c668
mov edi, eax
jmp 0x40b845
mov ecx, dword [edi + 0xa0]
push esi
mov dword [eax + 0x10], ecx
mov eax, dword [edi + 0x54]
push esi
call fcn.00406267
mov eax, dword [edi + 0x54]
mov dword [eax + 0xc], edi
mov edi, dword [edi + 0x54]
lea eax, [ebp]
push eax
call fcn.0040649c
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 0x40b4e7
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 0x40b93c
cmp eax, 0xffffffff
je 0x40b93c
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.004026ee
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004026ee
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.004026ee
xor eax, eax
inc eax
jmp 0x40b974
mov eax, dword [esi + 8]
cmp eax, edi
je 0x40b845
cmp eax, 0xffffffff
je 0x40b845
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], edi
jmp 0x40b845
cmp ecx, ebx
je 0x40b972
cmp ecx, 0xffffffff
je 0x40b972
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.0044c18b
add ebp, 0x804
leave
ret 0x10