Function at 0x10008160
Capabilities:
Create thread

Disassembly:
push ecx
mov eax, dword [0x1005c4d4]
test eax, eax
push edi
mov edi, ecx
jne 0x10008172
mov eax, 0x100201d8
push ebx
push esi
push eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0
call fcn.10005cf0
mov esi, dword [esp + 0xc]
push 0x1002b778
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
push esi
setne bl
call fcn.10002e75
add esp, 4
pop esi
test bl, bl
pop ebx
je 0x100081d5
cmp dword [0x1005c4e0], 0
jne 0x100081d5
lea eax, [esp + 4]
push eax
push 0
push 0
push 0x10003ed0
push 0
push 0
mov dword [0x1005c4e0], 1
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [edi + 8]
pop edi
add esp, 4
jmp 0x1001a480
sub esp, 8
cmp dword [esp + 0x28], 0
push ebx
push esi
push edi
mov ebx, ecx
jne 0x1001a49d
mov eax, 0xc0000005
pop edi
pop esi
pop ebx
add esp, 8
ret 0x24
lea eax, [ebx + 0x54]
push eax
lea ecx, [esp + 0x14]
call fcn.1000fcf0
mov ecx, ebx
call fcn.10018ff0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push ecx
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
mov ecx, ebx
call fcn.100193c0
cmp dword [0x1005c4bc], 0
je 0x1001a52c
mov edx, dword [esp + 0x2c]
push 0x1002047c
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], 0
call fcn.100035c0
push 0x1002ac68
lea ecx, [esp + 0x20]
call fcn.1000f610
mov ecx, eax
call fcn.1000f930
mov esi, dword [esp + 0x20]
push esi
mov ecx, eax
call fcn.1000f990
push esi
mov edi, eax
call fcn.10002e75
add esp, 4
mov ecx, edi
call fcn.1000f930
lea ecx, [esp + 0x18]
call fcn.1000f640
mov ecx, dword [esp + 0x2c]
push 1
lea eax, [esp + 0x10]
push eax
push ecx
mov ecx, ebx
call fcn.100195a0
mov esi, eax
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0x18], esi
jne 0x1001a552
mov eax, 0x100203b8
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 0
call fcn.100035c0
mov edi, dword [esp + 0x1c]
lea ecx, [esi + 0xc]
push edi
call fcn.100035c0
push edi
call fcn.10002e75
add esp, 4
mov dword [esi + 0x10], 1
call fcn.1000cef0
mov edi, eax
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
lea ecx, [ebx + 0x48]
mov dword [esp + 0x24], edi
call fcn.10007c70
lea edx, [esp + 0x1c]
push edx
mov eax, edx
lea ecx, [esi + 0x14]
push eax
call fcn.10007c70
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
test eax, eax
mov dword [ecx], edi
mov ecx, dword [esp + 0xc]
je 0x1001a5cb
mov edx, ecx
neg edx
sbb edx, edx
add edx, 2
mov dword [eax], edx
cmp dword [0x1005c4bc], 0
je 0x1001a665
test ecx, ecx
mov esi, 0x1002ac48
jne 0x1001a5e6
mov esi, 0x1002ac34
mov eax, dword [esp + 0x2c]
push 0x10020410
push edi
push 0x1002ac24
push eax
lea ecx, [esp + 0x44]
mov dword [esp + 0x44], 0
call fcn.100035c0
push 0x1002a918
push esi
push 0x1002abfc
lea ecx, [esp + 0x34]
call fcn.1000f610
mov ecx, eax
call fcn.1000f930
mov ecx, eax
call fcn.1000f990
mov ecx, eax
call fcn.1000f930
mov esi, dword [esp + 0x40]
push esi
mov ecx, eax
call fcn.1000f990
push esi
mov edi, eax
call fcn.10002e75
add esp, 4
mov ecx, edi
call fcn.1000f930
mov ecx, eax
call fcn.1000fa10
mov ecx, eax
call fcn.1000f930
lea ecx, [esp + 0x1c]
call fcn.1000f640
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.10002e75
add esp, 4
lea ecx, [esp + 0x10]
call fcn.1000fd10
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 8
ret 0x24