Function at 0x100161f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101de122
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push esi
push edi
mov eax, dword [0x1025e344]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], edi
test edi, edi
je 0x1001622f
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 1
lea eax, [ebp - 0x50]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov eax, dword [esi]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x4c]
mov dword [ebp + 8], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 8]
sub eax, 0x10
push eax
call fcn.100041a0
add eax, 0x10
mov dword [ebp - 0x48], eax
mov byte [ebp - 4], 5
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x10], 1
push eax
call fcn.10017870
add esp, 0xc
mov byte [ebp - 4], 0xa
mov eax, 1
mov dword [ebp - 0x10], eax
and eax, 0xfffffffe
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x50]
call fcn.10018950
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
test ebx, ebx
je 0x100162d0
lock inc dword [ebx + 4]
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x30], ebx
mov byte [ebp - 4], 0xe
mov eax, dword [edi + 0x30]
mov ecx, dword [edi + 0x28]
inc eax
cmp ecx, eax
ja 0x100162f8
push 1
lea ecx, [edi + 0x20]
call fcn.100294a0
mov ecx, dword [edi + 0x28]
lea eax, [ecx - 1]
and dword [edi + 0x2c], eax
mov eax, dword [edi + 0x30]
add eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x28]
mov edx, dword [edi + 0x24]
dec ecx
and ecx, eax
cmp dword [edx + ecx*4], 0
lea eax, [ecx*4]
mov dword [ebp + 8], eax
jne 0x10016336
push 0x28
call fcn.100cff51
mov edx, dword [ebp + 8]
add esp, 4
mov ecx, dword [edi + 0x24]
mov dword [edx + ecx], eax
mov edx, dword [edi + 0x24]
mov eax, dword [ebp + 8]
mov edx, dword [edx + eax]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp + 8], edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 4], 0x10
mov dword [edx + 0x24], 0
mov byte [ebp - 4], 0x11
lea ecx, [edx + 4]
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x24]
mov dword [edx], vtable.std::_Func_impl_no_alloc_class__lambda_7d89342aaa2c8f5654fd8856cae0543c___void___.0
mov dword [ecx], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], edx
mov dword [ecx + 4], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov byte [ebp - 4], 0x11
mov dword [edx + 0x24], edx
mov byte [ebp - 4], 0xe
inc dword [edi + 0x30]
mov byte [ebp - 4], 0xb
cmp dword [edi + 0x18], 0
jne 0x100163d7
lea eax, [edi + 0x1c]
push eax
push 0
push edi
push 0x10027020
push 0
push 0
call fcn.101b381e
add esp, 0x18
mov dword [edi + 0x18], eax
mov byte [ebp + 0xb], 1
jmp 0x100163db
mov byte [ebp + 0xb], 0
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x38]
test esi, esi
je 0x10016407
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x10016407
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x10016407
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 4]
mov dword [ebp - 4], 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp + 0xb]
mov dword [ebp - 0x18], 0
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