Function at 0x410e50
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, eax
mov eax, 0x82082083
imul edi
add edx, edi
sar edx, 5
mov esi, edx
shr esi, 0x1f
add esi, edx
mov eax, esi
shl eax, 6
sub eax, esi
mov ebx, edi
sub ebx, eax
mov eax, 0
setne al
mov dword [ebp - 0xc], 0xffffffff
mov dword [ebp - 0x14], ebx
add eax, esi
lea ecx, [eax + eax*2]
add ecx, ecx
add ecx, ecx
add ecx, ecx
push ecx
call fcn.00454d6a
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x410f31
test byte [0x492ce0], 0x80
je 0x41116e
call fcn.00455413
mov esi, dword [eax]
push 0x492cc8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str._wait_for_all
push str.sysdeps_win32.cpp
push str._s::_s__:
call fcn.00454e90
add eax, 0x40
push eax
call fcn.00455c4a
add esp, 0x10
call fcn.00455413
push edi
push str.Unable_to_allocate_thread_array_for__d_handles.
mov dword [eax], esi
call fcn.00454e90
add eax, 0x40
push eax
call fcn.00455c4a
call fcn.00454e90
add eax, 0x40
push eax
call fcn.004552a8
add esp, 0x10
push 0x492cc8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00455413
pop edi
mov dword [eax], esi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 8], eax
test eax, eax
jne 0x410fdf
test byte [0x492ce0], 0x80
je 0x410fc9
call fcn.00455413
mov esi, dword [eax]
push 0x492cc8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str._wait_for_all
push str.sysdeps_win32.cpp
push str._s::_s__:
call fcn.00454e90
add eax, 0x40
push eax
call fcn.00455c4a
add esp, 0x10
call fcn.00455413
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_create_main_event._Error:__d
call fcn.00454e90
add eax, 0x40
push eax
call fcn.00455c4a
call fcn.00454e90
add eax, 0x40
push eax
call fcn.004552a8
add esp, 0x10
push 0x492cc8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00455413
mov dword [eax], esi
mov edx, dword [ebp - 4]
push edx
call fcn.00454cf0
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
test esi, esi
jle 0x411021
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
xor ecx, ecx
add eax, 0x10
mov dword [ebp - 0x10], esi
mov edi, esi
mov ebx, dword [ebp - 8]
mov dword [eax - 0x10], ebx
lea ebx, [ebp - 0xc]
mov dword [eax], ecx
mov dword [eax - 8], edx
mov dword [eax - 0xc], ebx
mov dword [eax - 4], 0x3f
add ecx, 0x3f
add edx, 0xfc
add eax, 0x18
dec dword [ebp - 0x10]
jne 0x410ff5
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x411050
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
lea eax, [edi + edi*2]
lea eax, [ecx + eax*8]
lea ecx, [ebp - 0xc]
mov dword [eax + 4], ecx
mov ecx, edi
shl ecx, 6
sub ecx, edi
mov dword [eax], edx
mov edx, dword [ebp + 8]
mov dword [eax + 0x10], ecx
lea ecx, [edx + ecx*4]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ebx
inc esi
xor edi, edi
test esi, esi
jle 0x411118
mov ebx, dword [ebp - 4]
lea ecx, [ecx]
push 0
push 0
push ebx
push 0x410dc0
push 0
push 0
call fcn.004577c5
add esp, 0x18
mov dword [ebx + 0x14], eax
test eax, eax
je 0x41108a
inc edi
add ebx, 0x18
cmp edi, esi
jl 0x411060
jmp 0x411118
test byte [0x492ce0], 0x80
je 0x41110c
call fcn.00455413
mov ebx, dword [eax]
push 0x492cc8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str._wait_for_all
push str.sysdeps_win32.cpp
push str._s::_s__:
call fcn.00454e90
add eax, 0x40
push eax
call fcn.00455c4a
add esp, 0x10
call fcn.00455413
mov dword [eax], ebx
call fcn.00455413
mov edx, dword [eax]
push edx
push esi
push edi
push str.Unable_to_create_a_waiting_thread__d_of__d._errno_d
call fcn.00454e90
add eax, 0x40
push eax
call fcn.00455c4a
call fcn.00454e90
add eax, 0x40
push eax
call fcn.004552a8
add esp, 0x18
push 0x492cc8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.00455413
mov dword [eax], ebx
mov eax, dword [ebp - 8]
push eax
mov esi, edi
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp - 8]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
push ecx
call ebx
test esi, esi
jle 0x411146
mov edi, dword [ebp - 4]
add edi, 0x14
mov edx, dword [edi]
push 0xffffffffffffffff
push edx
call ebx
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 0x18
dec esi
jne 0x411130
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 4]
push edx
call fcn.00454cf0
add esp, 4
push 0xffffffffffffffff
push 0xffffffffffffffff
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jns 0x411171
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret