Function at 0x1046703
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x111027c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
lea esi, [ebp + 0xc]
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp + 0x20]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x24]
mov dword [ebp - 0xbc], eax
xor eax, eax
mov esi, 0x1111850
mov dword [ebp - 0xcc], edi
mov dword [ebp - 0xc8], 0x100396c
mov dword [ebp - 0xc4], esi
mov byte [ebp - 0xc0], 0
mov byte [ebp - 0xa5], 0
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xb8], eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x10467ac
test byte [eax + 0x1c], 1
je 0x10467ac
cmp byte [eax + 0x19], 4
jb 0x10467ac
push 0x1003928
push 0xe1
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101894a
mov eax, dword [0x111024c]
test edi, edi
jne 0x10467bf
mov dword [ebp - 0xa4], 0x80004003
jmp 0x1046a6d
and dword [edi], 0
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 8]
mov byte [ebp - 0xc0], 1
test eax, eax
jne 0x10467e6
mov dword [ebp - 0xa4], 0x8078000a
jmp 0x1046a68
cmp dword [ebp - 0xb0], 0
jne 0x10467f5
mov dword [ebp - 0xb0], eax
cmp byte [ebx + 0xc], 0
je 0x1046842
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x1046833
test byte [eax + 0x1c], 1
je 0x1046833
cmp byte [eax + 0x19], 2
jb 0x1046833
push dword [ebx + 4]
push dword [ebx + 0x24]
push 0x1003928
push 0xe2
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01083f04
mov eax, dword [0x111024c]
mov dword [ebp - 0xa4], 0x80780017
jmp 0x1046a6d
push 0x8c
lea eax, [ebp - 0xa0]
push 0
push eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xb0]
mov eax, dword [eax]
add esp, 0xc
lea ecx, [ebp - 0xa0]
push ecx
sub esp, 0x10
mov edi, esp
push dword [ebp - 0xb0]
lea esi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [eax + 0x2c]
mov dword [ebp - 0xa4], eax
test eax, eax
jl 0x1046a68
lea eax, [ebp - 0xb4]
push eax
mov byte [ebp - 0xa5], 1
call fcn.0104614b
mov dword [ebp - 0xa4], eax
test eax, eax
jge 0x10468eb
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x1046a6d
test byte [eax + 0x1c], 1
je 0x1046a6d
cmp byte [eax + 0x19], 2
jb 0x1046a6d
push dword [ebp - 0xa4]
push 0x1003928
push 0xe3
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019fa8
jmp 0x1046a68
mov esi, dword [ebp - 0xb4]
mov eax, dword [esi]
push esi
call dword [eax + 4]
push dword [ebp - 0xb0]
lea edi, [esi + 4]
mov ecx, edi
call fcn.01018ab0
push dword [ebp - 0xbc]
mov ecx, edi
call fcn.0101910d
mov dword [ebp - 0xa4], eax
test eax, eax
jl 0x1046a68
mov eax, dword [esi]
lea ecx, [ebp - 0xac]
push ecx
push 0x1013734
push esi
call dword [eax]
mov dword [ebp - 0xa4], eax
test eax, eax
jge 0x1046976
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x1046a6d
test byte [eax + 0x1c], 1
je 0x1046a6d
cmp byte [eax + 0x19], 2
jb 0x1046a6d
push dword [ebp - 0xa4]
push 0x1003928
push 0xe4
jmp 0x10468db
lea eax, [ebp - 0xa0]
push eax
push ebx
mov ecx, esi
call fcn.01050d7c
mov dword [ebp - 0xa4], eax
xor eax, eax
cmp dword [ebp - 0xa4], eax
jl 0x1046a68
push eax
push eax
push esi
push 0x1051ae8
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
xor esi, esi
mov dword [ebp - 0xb8], eax
cmp eax, esi
jne 0x1046a08
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x10469f0
test byte [eax + 0x1c], 1
je 0x10469f0
cmp byte [eax + 0x19], 2
jb 0x10469f0
push edi
push 0x1003928
push 0xe5
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019fa8
mov eax, dword [0x111024c]
cmp edi, esi
jle 0x1046a00
and edi, 0xffff
or edi, 0x80070000
mov dword [ebp - 0xa4], edi
jmp 0x1046a6d
mov byte [ebx + 0xc], 1
cmp dword [ebx + 0x1c], esi
jne 0x1046a16
cmp dword [ebx + 0x20], esi
je 0x1046a2a
push 0x10044ac
push 0x12fe
push 0x1003938
call fcn.0107b644
mov eax, dword [ebp - 0xac]
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x20], eax
mov ecx, dword [eax]
push eax
mov dword [ebp - 0xb4], esi
call dword [ecx + 4]
mov eax, dword [ebp - 0xac]
mov ecx, dword [ebp - 0xcc]
mov dword [ebx + 0x24], 3
mov dword [ecx], eax
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xac], esi
call fcn.01037a16
mov eax, dword [0x111024c]
mov ecx, dword [ebp - 0xac]
test ecx, ecx
je 0x1046a82
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [0x111024c]
cmp dword [ebp - 0xb8], 0
je 0x1046a9c
push dword [ebp - 0xb8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111024c]
mov ecx, dword [ebp - 0xb4]
test ecx, ecx
je 0x1046ab1
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [0x111024c]
cmp byte [ebp - 0xa5], 0
je 0x1046acb
lea eax, [ebp - 0xa0]
push eax
call fcn.01087cb0
mov eax, dword [0x111024c]
cmp dword [ebp - 0xa4], 0
jge 0x1046b07
cmp eax, 0x111024c
je 0x1046b2f
test byte [eax + 0x1c], 1
je 0x1046b07
cmp byte [eax + 0x19], 2
jb 0x1046b07
push dword [ebp - 0xa4]
push 0x1003928
push 0xe6
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01019fa8
mov eax, dword [0x111024c]
cmp eax, 0x111024c
je 0x1046b2f
test byte [eax + 0x1c], 1
je 0x1046b2f
cmp byte [eax + 0x19], 4
jb 0x1046b2f
push 0x1003928
push 0xe7
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101894a
lea ecx, [ebp - 0xc8]
call fcn.01037a46
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xa4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0106f798
leave
ret 0x20