Function at 0x41d100
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e03cf
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x524a60]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x41d138
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 0
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, 0x10
mov dword [ebp + 8], ecx
push eax
mov dword [ebp - 0x34], ecx
call fcn.00404230
add eax, 0x10
mov dword [ebp - 0x30], eax
push 0x38
mov byte [ebp - 4], 1
call fcn.004a12b0
mov edi, eax
add esp, 8
mov dword [ebp - 0x14], edi
or eax, 0xffffffff
mov byte [ebp - 4], 2
test edi, edi
je 0x41d1ea
mov eax, dword [ebp + 8]
lea esi, [edi + 0x10]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
mov dword [edi + 4], 1
push eax
mov dword [edi + 8], 1
mov dword [edi], vtable.std::_Ref_count_obj_class_std::function_int____cdecl___void___.0
mov dword [ebp - 0x18], esi
call fcn.00404230
add eax, 0x10
mov dword [ebp - 0x24], eax
mov dword [esi + 0x24], 0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push eax
call fcn.0041d600
mov edx, dword [ebp - 0x24]
add esp, 8
mov dword [esi + 0x24], eax
add edx, 0xfffffff0
mov byte [ebp - 4], 2
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d1e5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
or eax, 0xffffffff
jmp 0x41d1ec
xor edi, edi
lea ecx, [edi + 0x10]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x30]
mov byte [ebp - 4], 6
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41d214
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [edi + 0x10]
test edi, edi
je 0x41d21c
lock inc dword [edi + 4]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edi
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x28]
inc eax
mov byte [ebp - 4], 7
cmp ecx, eax
ja 0x41d23e
push 1
lea ecx, [ebx + 0x20]
call fcn.00427c10
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 + 8], eax
cmp dword [ecx + eax], 0
jne 0x41d27b
push 0x28
call fcn.004a12b0
mov ecx, dword [ebx + 0x24]
add esp, 4
mov edx, dword [ebp + 8]
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_4a93cecc4e4b2297a7b372903e35ba4a___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 0x41d2ba
lea eax, [ebx + 0x1c]
push eax
push 0
push ebx
push 0x427530
push 0
push 0
call fcn.004ba0b0
add esp, 0x18
mov dword [ebx + 0x18], eax
mov byte [ebp + 0xb], 1
jmp 0x41d2be
mov byte [ebp + 0xb], 0
test edi, edi
je 0x41d2e3
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x41d2e3
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x41d2e3
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4