Function at 0x10009440
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008a96f
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x100b3400]
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 ebx, ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x54], ebx
test ebx, ebx
je 0x1000947e
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi]
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
call fcn.1000ef40
mov ecx, dword [esi + 4]
mov dword [esi + 4], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov dword [esi + 8], ecx
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x28], eax
push 0x38
mov byte [ebp - 4], 1
call fcn.1003b724
mov edi, eax
add esp, 4
mov dword [ebp - 0x20], edi
mov byte [ebp - 4], 2
test edi, edi
je 0x1000957e
mov dword [edi + 4], 1
lea esi, [edi + 0x10]
mov dword [edi + 8], 1
lea ecx, [ebp - 0x44]
mov dword [edi], vtable.std::_Ref_count_obj_class_std::function_void____cdecl___void___.0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
call fcn.1000ef40
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x3c], eax
mov dword [esi + 0x24], 0
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 4
push eax
call fcn.10009af0
add esp, 4
mov dword [esi + 0x24], eax
mov esi, dword [ebp - 0x44]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 5
push dword [esi + 4]
call fcn.1000f0b0
mov eax, dword [ebp - 0x44]
push 0x40
mov dword [eax + 4], esi
mov eax, dword [ebp - 0x44]
mov dword [eax], esi
mov eax, dword [ebp - 0x44]
mov dword [eax + 8], esi
push dword [ebp - 0x44]
mov dword [ebp - 0x40], 0
call fcn.1003b754
add esp, 8
jmp 0x10009580
xor edi, edi
xorps xmm0, xmm0
lea eax, [edi + 0x10]
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edi
mov esi, dword [ebp - 0x30]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
push dword [esi + 4]
call fcn.1000f0b0
mov eax, dword [ebp - 0x30]
push 0x40
mov dword [eax + 4], esi
mov eax, dword [ebp - 0x30]
mov dword [eax], esi
mov eax, dword [ebp - 0x30]
mov dword [eax + 8], esi
push dword [ebp - 0x30]
mov dword [ebp - 0x2c], 0
call fcn.1003b754
add esp, 8
test edi, edi
je 0x100095d0
lock inc dword [edi + 4]
lea eax, [edi + 0x10]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x50], eax
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x28]
inc eax
mov byte [ebp - 4], 9
cmp ecx, eax
ja 0x100095f5
push 1
lea ecx, [ebx + 0x20]
call fcn.10006140
mov ecx, dword [ebx + 0x28]
lea eax, [ecx - 1]
and dword [ebx + 0x2c], eax
mov ecx, dword [ebx + 0x30]
add ecx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x28]
dec eax
and ecx, eax
lea eax, [ecx*4]
mov ecx, dword [ebx + 0x24]
mov dword [ebp - 0x20], eax
cmp dword [ecx + eax], 0
jne 0x10009632
push 0x28
call fcn.100096d0
mov ecx, dword [ebx + 0x24]
add esp, 4
mov edx, dword [ebp - 0x20]
mov dword [edx + ecx], eax
mov eax, edx
mov ecx, dword [ebx + 0x24]
mov eax, dword [ecx + eax]
lea ecx, [edi + 0x10]
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_05286a00a38c2ba9207b90c0dfb0b1b8___void___.0
mov dword [eax + 4], ecx
mov dword [eax + 8], edi
mov dword [eax + 0x24], eax
inc dword [ebx + 0x30]
cmp dword [ebx + 0x18], 0
jne 0x10009671
lea eax, [ebx + 0x1c]
push eax
push 0
push ebx
push 0x100057b0
push 0
push 0
call fcn.100500da
add esp, 0x18
mov dword [ebx + 0x18], eax
mov byte [ebp - 0x19], 1
jmp 0x10009675
mov byte [ebp - 0x19], 0
test edi, edi
je 0x1000969a
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x1000969a
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x1000969a
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp - 0x19]
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.1003bac5
mov esp, ebp
pop ebp
ret 4