Function at 0x1046e9c
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
mov eax, dword [0x111124c]
mov edi, 0x111124c
cmp eax, edi
je 0x1046ee3
test byte [eax + 0x1c], 1
je 0x1046ee3
cmp byte [eax + 0x19], 4
jb 0x1046ee3
push 0x1003920
push 0x171
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
lea eax, [ebp - 0xc]
push eax
call fcn.010461ac
cmp eax, ebx
mov dword [ebp - 4], eax
jge 0x1046f93
mov eax, dword [0x111124c]
cmp eax, edi
je 0x1046f29
test byte [eax + 0x1c], 1
je 0x1046f29
cmp byte [eax + 0x19], 2
jb 0x1046f29
push dword [ebp - 4]
push 0x1003920
push 0x172
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189f6
mov eax, dword [0x111124c]
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x1046f3e
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [0x111124c]
cmp dword [ebp - 0x10], 0
je 0x1046f52
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x111124c]
test edi, edi
je 0x1046f61
mov eax, dword [edi]
push edi
call dword [eax + 8]
mov eax, dword [0x111124c]
pop edi
pop esi
pop ebx
cmp eax, 0x111124c
je 0x1046f8c
test byte [eax + 0x1c], 1
je 0x1046f8c
cmp byte [eax + 0x19], 4
jb 0x1046f8c
push 0x1003920
push 0x175
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189d0
mov eax, dword [ebp - 4]
leave
ret 0x30
mov edi, dword [ebp - 0xc]
mov eax, dword [edi]
push edi
call dword [eax + 4]
push dword [ebp + 0x28]
lea ebx, [edi + 4]
mov ecx, ebx
call fcn.01018afd
push dword [ebp + 0x2c]
mov ecx, ebx
call fcn.0101915a
mov dword [ebp - 4], eax
test eax, eax
jl 0x104700b
mov eax, dword [edi]
lea ecx, [ebp - 8]
push ecx
push 0x10137bc
push edi
call dword [eax]
mov dword [ebp - 4], eax
test eax, eax
jge 0x1047015
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x1046f2c
test byte [eax + 0x1c], 1
je 0x1046f2c
cmp byte [eax + 0x19], 2
jb 0x1046f2c
push dword [ebp - 4]
push 0x1003920
push 0x173
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189f6
mov eax, dword [0x111124c]
jmp 0x1046f2c
push dword [ebp + 0x30]
mov al, byte [ebp + 0x24]
and al, 1
movzx eax, al
push eax
push 0
push dword [ebp + 0x1c]
mov ecx, edi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x20]
push esi
call fcn.0104cec4
mov dword [ebp - 4], eax
test eax, eax
jl 0x104700b
xor eax, eax
push eax
push eax
push edi
push 0x104faf0
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x10470b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [0x111124c]
cmp eax, 0x111124c
je 0x104709b
test byte [eax + 0x1c], 1
je 0x104709b
cmp byte [eax + 0x19], 2
jb 0x104709b
push esi
push 0x1003920
push 0x174
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010189f6
mov eax, dword [0x111124c]
test esi, esi
jle 0x10470ab
and esi, 0xffff
or esi, 0x80070000
mov dword [ebp - 4], esi
jmp 0x1046f2c
cmp dword [esi + 0x1c], 0
mov byte [esi + 0xc], 1
jne 0x10470c3
cmp dword [esi + 0x20], 0
je 0x10470d7
push 0x10044a4
push 0x1d47
push 0x1003930
call fcn.0107b4be
mov eax, dword [ebp - 8]
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], eax
mov ecx, dword [eax]
push eax
xor edi, edi
call dword [ecx + 4]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x34]
and dword [ebp - 8], edi
mov dword [esi + 0x24], 2
mov dword [ecx], eax
jmp 0x104700b