Function at 0x411a80
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 - 0x10], 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 dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x411b63
test byte [0x4815b8], 0x80
je 0x411daf
mov esi, dword [sym.imp.MSVCR100.dll__errno]
call esi
mov ebx, dword [eax]
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str._wait_for_all
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call esi
push edi
mov edi, dword [sym.imp.MSVCR100.dll___iob_func]
push str.Unable_to_allocate_thread_array_for__d_handles.
mov dword [eax], ebx
call edi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call edi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x10
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
pop edi
mov dword [eax], ebx
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_CreateEventW]
mov dword [ebp - 8], eax
test eax, eax
jne 0x411c0f
test byte [0x4815b8], 0x80
je 0x411bf8
mov esi, dword [sym.imp.MSVCR100.dll__errno]
call esi
mov edi, dword [eax]
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.MSVCR100.dll___iob_func]
push str._wait_for_all
push str.sysdeps_win32.cpp
push str._s::_s__:
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call esi
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Unable_to_create_main_event._Error:__d
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x10
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov dword [eax], edi
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCR100.dll_free]
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 0x411c51
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
xor ecx, ecx
add eax, 0x10
mov dword [ebp - 0xc], esi
mov edi, esi
mov ebx, dword [ebp - 8]
mov dword [eax - 0x10], ebx
lea ebx, [ebp - 0x10]
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 - 0xc]
jne 0x411c25
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x411c80
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
lea eax, [edi + edi*2]
lea eax, [ecx + eax*8]
lea ecx, [ebp - 0x10]
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 ebx, ebx
test esi, esi
jle 0x411d54
mov edi, dword [ebp - 4]
lea ecx, [ecx]
push 0
push 0
push edi
push 0x4119f0
push 0
push 0
call dword [sym.imp.MSVCR100.dll__beginthreadex]
add esp, 0x18
mov dword [edi + 0x14], eax
test eax, eax
je 0x411cbb
inc ebx
add edi, 0x18
cmp ebx, esi
jl 0x411c90
jmp 0x411d54
test byte [0x4815b8], 0x80
mov dword [ebp - 0xc], ebx
je 0x411d48
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str._wait_for_all
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call edi
mov dword [eax], ebx
call edi
mov edx, dword [eax]
mov eax, dword [ebp - 0xc]
push edx
push esi
mov esi, dword [sym.imp.MSVCR100.dll___iob_func]
push eax
push str.Unable_to_create_a_waiting_thread__d_of__d._errno_d
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x18
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
push ecx
mov esi, ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 8]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
push edx
call ebx
test esi, esi
jle 0x411d86
mov edi, dword [ebp - 4]
add edi, 0x14
lea esp, [esp]
mov eax, dword [edi]
push 0xffffffffffffffff
push eax
call ebx
mov ecx, dword [edi]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 0x18
dec esi
jne 0x411d70
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
push 0xffffffffffffffff
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jns 0x411db2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret