Function at 0x4999b7
Capabilities:
Create thread

Disassembly:
sub esp, 0x54
mov eax, dword [0x1001e40c]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x58]
push ebp
mov dword [esp + 8], eax
call fcn.00496a20
mov ebp, 1
cmp dword [0x1001f4ac], ebp
jne 0x49973d
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0049f2d1
add esp, 0x54
ret 0x20
push edi
mov ecx, 0x1001f5a8
call fcn.0049d700
xor edi, edi
push ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], edi
push esi
mov eax, dword [esp + 0x84]
test eax, eax
je 0x49976e
mov ecx, dword [edi + 0x1001e19c]
test dword [ecx + 0x14], eax
je 0x499941
mov eax, dword [0x1001f40c]
cmp eax, ebp
jne 0x499787
mov esi, dword [edi + 0x1001e19c]
cmp dword [esi + 0x18], ebp
je 0x49979e
jmp 0x499941
test eax, eax
jne 0x499941
mov esi, dword [edi + 0x1001e19c]
cmp dword [esi + 0x1c], ebp
jne 0x499941
mov edx, dword [esi + 8]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov ebx, dword [esi + 4]
mov dword [esp + 0x20], edx
lea edx, [esp + 0x1c]
push edx
push 0x10018634
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
call fcn.00496420
add esp, 8
test eax, eax
jne 0x499941
lea eax, [esp + 0x1c]
push eax
push 0x10018654
call fcn.00496420
add esp, 8
test eax, eax
jne 0x499941
cmp dword [esp + 0x18], ebp
jne 0x4997fd
cmp dword [esi + 0x20], ebp
je 0x499941
lea ecx, [esp + 0x1c]
push ecx
push 0x10018674
call fcn.00496420
add esp, 8
test eax, eax
je 0x499843
cmp dword [0x1001f420], 2
je 0x499843
mov ebx, dword [0x10018664]
mov edx, dword [0x10018668]
mov eax, dword [0x1001866c]
mov ecx, dword [0x10018670]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
mov edx, dword [0x1001f5a0]
mov edi, dword [edx]
mov esi, 0x1001f59c
test esi, esi
mov ebp, dword [0x1001f5a0]
je 0x499862
cmp esi, 0x1001f59c
je 0x499867
call fcn.0049fd4a
cmp edi, ebp
je 0x4998a5
test esi, esi
jne 0x499874
call fcn.0049fd4a
cmp edi, dword [esi + 4]
jne 0x49987e
call fcn.0049fd4a
lea eax, [esp + 0x1c]
push eax
lea ecx, [edi + 8]
push ecx
call fcn.00496420
add esp, 8
test eax, eax
jne 0x499938
cmp edi, dword [esi + 4]
jne 0x4998a1
call fcn.0049fd4a
mov edi, dword [edi]
jmp 0x499850
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
push edx
lea eax, [esp + 0x44]
push eax
push ecx
mov dword [esp + 0x4c], 0x20
mov dword [esp + 0x50], 5
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], ebp
mov byte [esp + 0x68], 0
call dword [0x100181b8]
test eax, eax
je 0x499a0b
mov dword [esp + 0x3c], eax
mov eax, dword [0x1001f5a0]
mov ecx, dword [eax + 4]
mov dword [esp + 0x34], edi
lea edi, [eax + 4]
lea edx, [esp + 0x2c]
push edx
push ecx
push eax
mov ecx, 0x1001f59c
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x44], ebp
call fcn.004981e0
push 1
mov ecx, 0x1001f59c
mov esi, eax
call fcn.00498590
mov dword [edi], esi
mov edx, dword [esi + 4]
mov dword [edx], esi
mov edi, dword [esp + 0x10]
mov ebp, 1
add edi, 4
cmp edi, 0x20
mov dword [esp + 0x10], edi
jb 0x499754
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
add dword [0x1001f4c8], ebp
mov esi, dword [0x10018078]
mov dword [0x1001f4b0], eax
mov eax, dword [esp + 0x7c]
mov dword [0x1001f4bc], eax
mov eax, dword [0x1001f4d4]
test eax, eax
mov dword [0x1001f4b4], ecx
mov ecx, dword [esp + 0x80]
mov dword [0x1001f4b8], edx
mov edx, dword [esp + 0x84]
mov dword [0x1001f4ac], ebp
mov dword [0x1001f4c0], ecx
mov dword [0x1001f4c4], edx
je 0x4999b1
push 0xffffffffffffffff
push eax
call esi
mov eax, dword [0x1001f4c8]
push eax
push 0
push 0x10006000
call fcn.004a0423
mov dword [0x1001f4d4], eax
mov eax, dword [0x1001f4d8]
add esp, 0xc
test eax, eax
je 0x4999d9
push 0xffffffffffffffff
push eax
call esi
mov ecx, dword [0x1001f4c8]
push ecx
push 0
push 0x10005480
call fcn.004a0423
add esp, 0xc
pop esi
pop ebx
mov dword [0x1001f4d8], eax
pop edi
mov eax, ebp
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0049f2d1
add esp, 0x54
ret 0x20
call fcn.004982e0
mov ecx, dword [esp + 0x60]
pop esi
pop ebx
pop edi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.0049f2d1
add esp, 0x54
ret 0x20