Function at 0x10005098
Capabilities:
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
push 0
mov ebx, 0x274
call fcn.10009650
add esp, 4
mov dword [ebp - 4], eax
push 0x80000004
push 0
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx]
test eax, eax
jne 0x100050ee
mov eax, 0x1002727a
push eax
push 0x80000004
push 0
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx]
test eax, eax
jne 0x10005104
mov eax, 0x1002727a
push eax
push 0x80000004
push 0
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
test eax, eax
jne 0x1000511a
mov eax, 0x1002727a
push eax
push 0x80000004
push 0
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
jne 0x10005130
mov eax, 0x1002727a
push eax
push 0x80000301
push 0
push dword [ebp - 4]
push 5
mov ebx, 0x2b0
call fcn.100096a0
add esp, 0x40
mov dword [ebp - 0x18], esp
mov eax, 0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
push 0
push dword [ebp - 4]
push 0x10005e27
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x1000518f
push 6
call fcn.100085f5
add esp, 4
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], esp
push 0x4bf
push 0xffffffff
push 0
lea eax, [ebp - 8]
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x100051c9
push 6
call fcn.100085f5
add esp, 4
mov dword [ebp - 0xc], eax
push 0
mov ebx, 0x350
call fcn.10009b00
add esp, 4
cmp dword [ebp - 0xc], 0
je 0x100051fc
cmp dword [ebp - 0xc], 0x102
je 0x100051fc
mov eax, 1
jmp 0x100051fe
xor eax, eax
test eax, eax
jne 0x10005192
mov dword [ebp - 0x18], esp
push 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x10005229
push 6
call fcn.100085f5
add esp, 4
mov dword [ebp - 0x18], esp
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
nop
nop
nop
cmp dword [ebp - 0x18], esp
je 0x1000524b
push 6
call fcn.100085f5
add esp, 4
push 0x80000301
push 0
push dword [ebp - 4]
push 1
mov ebx, 0x28c
call fcn.10009b70
add esp, 0x10
cmp dword [ebp - 0xc], 0x102
je 0x100052b7
push 0x80000004
push 0
lea eax, [ebp - 0x14]
push eax
push 0x80000004
push 0
lea eax, [ebp - 0x10]
push eax
push 0x80000301
push 0
push dword [ebp - 4]
push 3
mov ebx, 0x2ac
call fcn.10009f20
add esp, 0x28
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x100052b7
xor eax, eax
jmp 0x100052bc
mov eax, 1
test eax, eax
je 0x100052f8
mov eax, 0x1002749a
push eax
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x100052da
push ebx
call fcn.100085e3
add esp, 4
pop eax
mov dword [ebp - 0x14], eax
mov eax, str.err:ID
push eax
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x100052f4
push ebx
call fcn.100085e3
add esp, 4
pop eax
mov dword [ebp - 0x10], eax
push 0x80000301
push 0
push dword [ebp - 4]
push 1
mov ebx, 0x2bc
call fcn.1000a4c0
add esp, 0x10
push 0x80000301
push 0
push eax
push 0x80000301
push 0
push dword [ebp - 4]
push 2
mov ebx, 0x694
call fcn.1000a510
add esp, 0x1c
push 0x80000301
push 0
push dword [ebp - 4]
push 1
mov ebx, 0x278
call fcn.1000a6b0
add esp, 0x10
push dword [ebp - 0x10]
push 0x100274b2
push dword [ebp - 0x14]
mov ecx, 3
call fcn.1000322a
add esp, 0xc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
jmp 0x10005377
push eax
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x10005388
push ebx
call fcn.100085e3
add esp, 4
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x10005398
push ebx
call fcn.100085e3
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 0x10