Function at 0x1005a210
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100c2aa9
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x100f4c44]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x54]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x3c], eax
lea ebx, [esi + 0x200c4]
mov dword [ebp - 4], 1
push ebx
mov dword [ebp - 0x54], ebx
call fcn.1003ad97
add esp, 4
test eax, eax
je 0x1005a272
push eax
call fcn.1003b1a0
add esp, 4
mov byte [ebp - 0x50], 1
cmp dword [esi + 0x200c0], 0
mov byte [ebp - 4], 2
jne 0x1005a354
push 0
push 0
push esi
push 0x10012940
push 0
push 0
call fcn.1009638f
add esp, 0x18
mov dword [esi + 0x200c0], eax
test eax, eax
jne 0x1005a354
sub esp, 0x18
mov ecx, esp
push 0x11
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], 0xf
push str.begin_thread_fail
mov byte [ecx], al
call fcn.1000e070
mov ecx, esi
call fcn.10049cd0
lea ecx, [ebp - 0x4c]
call fcn.1005b5c0
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x30], 9
call fcn.10062f10
push edi
lea ecx, [ebp - 0x4c]
call fcn.10062e80
lea ecx, [ebp - 0x30]
call fcn.10049f60
lea ecx, [ebp - 0x4c]
call fcn.1005baf0
push ebx
mov byte [ebp - 4], 5
call fcn.1003adbc
add esp, 4
test eax, eax
je 0x1005a333
push eax
call fcn.1003b1a0
add esp, 4
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x1005a58a
mov esi, dword [ecx]
lea eax, [ebp + 0x14]
cmp ecx, eax
setne al
movzx edx, al
push edx
call dword [esi + 0x10]
jmp 0x1005a583
push 0x14
call fcn.10046ce3
mov ebx, eax
add esp, 4
mov dword [ebp - 0x40], ebx
mov byte [ebp - 4], 6
test ebx, ebx
je 0x1005a389
push dword [ebp - 0x3c]
lea eax, [ebp + 0x3c]
sub esp, 0x18
mov ecx, esp
push eax
call fcn.10011be0
push ebx
mov ecx, esi
call fcn.1005a770
mov dword [ebp - 0x3c], eax
jmp 0x1005a390
mov dword [ebp - 0x3c], 0
push 0xc
mov byte [ebp - 4], 2
call fcn.10046ce3
add esp, 4
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 7
test eax, eax
je 0x1005a3b4
mov ecx, eax
call fcn.1005b5c0
mov ebx, eax
jmp 0x1005a3b6
xor ebx, ebx
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 2
push eax
mov ecx, ebx
call fcn.10062e80
cmp dword [esi + 4], 0
je 0x1005a454
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 9
push eax
mov ecx, ebx
mov dword [ebp - 0x30], 0xa
call fcn.10062f10
lea eax, [ebp - 0x48]
mov dword [edi], 0
cmp edi, eax
je 0x1005a413
mov eax, dword [ebp - 0x48]
xor esi, esi
mov dword [edi], eax
mov al, byte [ebp - 0x44]
mov byte [edi + 4], al
jmp 0x1005a416
mov esi, dword [ebp - 0x48]
lea ecx, [ebp - 0x30]
mov byte [edi + 4], 1
call fcn.10049f60
mov byte [ebp - 4], 0xb
test esi, esi
je 0x1005a44b
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x1005a44b
mov ecx, dword [esi + 0x94]
test ecx, ecx
je 0x1005a443
mov eax, dword [ecx]
push esi
jmp 0x1005a449
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov byte [ebp - 4], 0xc
jmp 0x1005a553
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0x84]
mov dword [ebp - 0x94], 0x10059ec0
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x60], 0
mov ecx, dword [ebp + 0x38]
mov byte [ebp - 4], 0xd
test ecx, ecx
je 0x1005a496
mov eax, dword [ecx]
lea edx, [ebp - 0x84]
push edx
call dword [eax]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x94]
mov byte [ebp - 4], 0xf
push eax
call fcn.1005ac40
mov ecx, dword [ebp - 0x60]
add esp, 4
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x1005a4d8
mov edx, dword [ecx]
lea eax, [ebp - 0x84]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [ebp - 0x60], 0
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 0x10
push eax
lea ecx, [esi + 0x20098]
call fcn.100167c0
lea eax, [ebp - 0x48]
mov dword [edi], 0
cmp edi, eax
je 0x1005a507
mov eax, dword [ebp - 0x48]
xor esi, esi
mov dword [edi], eax
mov al, byte [ebp - 0x44]
mov byte [edi + 4], al
jmp 0x1005a50a
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x14]
mov byte [edi + 4], 1
test ecx, ecx
je 0x1005a526
mov edx, dword [ecx]
lea eax, [ebp - 0x38]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov byte [ebp - 4], 0x12
test esi, esi
je 0x1005a54f
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x1005a54f
mov ecx, dword [esi + 0x94]
test ecx, ecx
je 0x1005a547
mov eax, dword [ecx]
push esi
jmp 0x1005a54d
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax]
mov byte [ebp - 4], 0x13
push dword [ebp - 0x54]
call fcn.1003adbc
add esp, 4
test eax, eax
je 0x1005a56b
push eax
call fcn.1003b1a0
add esp, 4
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x1005a58a
mov edx, dword [ecx]
lea eax, [ebp + 0x14]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [ebp + 0x38], 0
lea ecx, [ebp + 0x3c]
call fcn.10009d90
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100470a0
mov esp, ebp
pop ebp
ret 0x50