Function at 0x406e90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46aa02
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x4961ec]
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 eax, dword [ebp + 0x18]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x406eda
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
push dword [ebp - 0x20]
mov dword [ebp - 4], 0
mov eax, dword [eax]
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x78]
mov ecx, eax
mov dword [ebp - 0x24], eax
call fcn.00407bd0
push edi
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 1
call fcn.00407bd0
push esi
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.00407bd0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
push 0x38
mov byte [ebp - 4], 3
call fcn.0042ec54
mov edi, eax
add esp, 4
mov dword [ebp - 0x14], edi
test edi, edi
je 0x406f85
lea eax, [ebp - 0x7c]
mov dword [edi + 4], 1
lea esi, [edi + 0x10]
mov dword [edi + 8], 1
push eax
lea ecx, [ebp - 0xcc]
mov dword [edi], vtable.std::_Ref_count_obj_class_std::function_void____cdecl___void___.0
mov dword [ebp - 0x24], esi
call fcn.00407b30
mov dword [esi + 0x24], 0
lea eax, [ebp - 0xcc]
mov byte [ebp - 4], 6
push eax
call fcn.00407280
add esp, 4
mov dword [esi + 0x24], eax
lea ecx, [ebp - 0xc8]
call fcn.00408060
jmp 0x406f87
xor edi, edi
xorps xmm0, xmm0
lea esi, [edi + 0x10]
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], edi
lea ecx, [ebp - 0x78]
call fcn.00408060
test edi, edi
je 0x406fa8
lock inc dword [edi + 4]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], edi
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x28]
inc eax
mov byte [ebp - 4], 9
cmp ecx, eax
ja 0x406fca
push 1
lea ecx, [ebx + 0x20]
call fcn.0040b6d0
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 0x407007
push 0x28
call fcn.0042ec54
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_efba7a61b7c6b56a6f2133a165da6bd1___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 0x407046
lea eax, [ebx + 0x1c]
push eax
push 0
push ebx
push 0x40ab40
push 0
push 0
call fcn.0043c8d1
add esp, 0x18
mov dword [ebx + 0x18], eax
mov byte [ebp - 0x19], 1
jmp 0x40704a
mov byte [ebp - 0x19], 0
test edi, edi
je 0x40706f
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x40706f
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x40706f
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.0042ef2c
mov esp, ebp
pop ebp
ret 0x14