Function at 0x419760
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
lea esi, [esi]
mov ebx, dword [0x4ee240]
test ebx, ebx
je 0x419843
xor esi, esi
jmp 0x419788
mov ebx, dword [ebx]
test ebx, ebx
je 0x4197b8
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x10], 0
test eax, eax
je 0x419782
mov dword [esp], ebx
call eax
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x419782
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
mov esi, 1
call fcn.00414e00
mov ebx, dword [ebx]
test ebx, ebx
jne 0x419788
test esi, esi
je 0x419872
mov ebx, dword [0x4ee240]
test ebx, ebx
je 0x419860
nop
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x4197eb
mov dword [esp], ebx
call eax
test eax, eax
je 0x4197eb
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
call fcn.00414e00
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4197d0
mov eax, dword [0x4a7240]
cmp eax, 0x4a7240
je 0x419770
mov edx, dword [eax]
xor ecx, ecx
mov dword [edx + 4], 0x4a7240
mov dword [0x4a7240], edx
movzx edx, word [eax + 0x12]
mov word [eax + 0x12], cx
mov ecx, dword [eax + 0x18]
mov dword [eax], 0
mov dword [eax + 4], 0
and word [eax + 0x10], 0xfdff
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov edx, dword [eax + 8]
mov dword [esp], edx
call dword [eax + 0x14]
jmp 0x419860
mov dword [0x4ee444], 0
test byte [0x4ee060], 0x80
jne 0x41a150
lea esi, [esi]
mov eax, dword [0x4a7240]
cmp eax, 0x4a7240
je 0x419770
jmp 0x419801
mov ebx, dword [0x4ee240]
mov dword [0x4ee444], 0
test ebx, ebx
je 0x41984d
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x41989a
mov dword [esp], ebx
call eax
test eax, eax
je 0x419d32
mov ecx, dword [ebx + 8]
cmp ecx, 0xffffffff
je 0x4198da
mov edx, dword [0x4ee444]
test edx, edx
jle 0x4198c8
cmp ecx, dword [0x4ee244]
je 0x4198da
xor eax, eax
jmp 0x4198c1
cmp ecx, dword [eax*4 + 0x4ee244]
je 0x4198da
add eax, 1
cmp eax, edx
jne 0x4198b8
lea eax, [edx + 1]
mov dword [0x4ee444], eax
mov eax, dword [ebx + 8]
mov dword [edx*4 + 0x4ee244], eax
mov ebx, dword [ebx]
test ebx, ebx
jne 0x419886
mov ebx, dword [0x4ee444]
test ebx, ebx
je 0x41984d
nop
mov eax, dword [0x4ee060]
test al, 0x80
jne 0x419c8f
mov esi, dword [0x4ee444]
cmp esi, 0x40
jle 0x419ba7
test byte [0x4ee060], 0x80
jne 0x419f43
mov eax, 0x82082083
imul esi
mov eax, esi
sar eax, 0x1f
mov dword [ebp - 0x1c], 0xffffffff
lea ebx, [edx + esi]
sar ebx, 5
sub ebx, eax
mov eax, esi
mov edi, ebx
shl edi, 6
sub edi, ebx
sub eax, edi
mov dword [ebp - 0x38], eax
setne al
mov byte [ebp - 0x34], al
movzx eax, al
add eax, ebx
lea eax, [eax + eax*2]
shl eax, 3
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0x2c], eax
je 0x419df5
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x30], eax
je 0x41a1ce
xor eax, eax
test ebx, ebx
mov ecx, dword [ebp - 0x2c]
mov edx, 0x4ee244
jle 0x41a149
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x3c], ebx
mov dword [ecx + 0x10], eax
lea ebx, [ebp - 0x1c]
add eax, 0x3f
mov dword [ecx + 8], edx
add ecx, 0x18
add edx, 0xfc
mov dword [ecx - 0x18], esi
mov dword [ecx - 0x14], ebx
mov dword [ecx - 0xc], 0x3f
cmp eax, edi
jne 0x4199b1
mov ebx, dword [ebp - 0x3c]
mov edx, ebx
cmp byte [ebp - 0x34], 0
je 0x419a13
mov edi, dword [ebp - 0x2c]
lea eax, [edx + edx*2]
mov ecx, edx
shl ecx, 6
add ebx, 1
sub ecx, edx
lea edx, [ecx*4 + 0x4ee244]
lea eax, [edi + eax*8]
mov edi, dword [ebp - 0x30]
mov dword [eax + 0x10], ecx
mov dword [eax + 8], edx
mov dword [eax], edi
lea edi, [ebp - 0x1c]
mov dword [eax + 4], edi
mov edi, dword [ebp - 0x38]
mov dword [eax + 0xc], edi
test ebx, ebx
jle 0x41a1b2
mov esi, dword [ebp - 0x2c]
xor edi, edi
jmp 0x419a30
add edi, 1
add esi, 0x18
cmp edi, ebx
je 0x419dd9
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x414c50
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
mov dword [esi + 0x14], eax
jne 0x419a22
test byte [0x4ee060], 0x80
jne 0x419fec
mov esi, dword [ebp - 0x30]
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test edi, edi
je 0x419ad1
mov ebx, dword [ebp - 0x2c]
xor esi, esi
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebx + 0x14]
add esi, 1
add ebx, 0x18
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx - 4]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
cmp esi, edi
jl 0x419aa1
mov eax, dword [ebp - 0x30]
mov esi, 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2c]
sub esp, 4
mov dword [esp], eax
call fcn.0049e1d0
lea eax, [ebp - 0x1c]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call fcn.0049e3f0
sub esp, 0xc
test eax, eax
cmovns esi, eax
cmp esi, 0xffffffff
je 0x419bd6
test byte [0x4ee060], 0x80
jne 0x419ea5
cmp esi, dword [0x4ee444]
jae 0x4198f0
mov ebx, dword [0x4ee240]
test ebx, ebx
jne 0x419b4e
jmp 0x4198f0
mov ebx, dword [ebx]
test ebx, ebx
je 0x4198f0
mov eax, dword [ebx + 8]
cmp dword [esi*4 + 0x4ee244], eax
jne 0x419b44
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x419b6a
mov dword [esp], ebx
call eax
test eax, eax
je 0x419b44
test byte [0x4ee060], 0x80
jne 0x41a09e
mov eax, dword [ebx + 4]
lea edx, [ebx + 0xc]
call fcn.00414e00
mov ebx, dword [0x4ee240]
test ebx, ebx
je 0x419860
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x419b9c
mov dword [esp], ebx
call eax
mov ebx, dword [ebx]
test ebx, ebx
jne 0x419b90
jmp 0x4197c0
mov dword [esp], esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4ee244
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov esi, eax
sub esp, 0x10
cmp esi, 0xffffffff
jne 0x419b1c
mov eax, dword [0x4ee060]
test al, 0x80
je 0x4198f5
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], esi
mov dword [esp + 8], str.fdevent_process
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.adb_win32:_wait_failed__error__ld_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x4ee060]
test al, 0x80
je 0x4198fd
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], esi
mov dword [esp + 8], str.fdevent_process
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x4ee444]
mov dword [esp + 4], str.adb_win32:_waiting_for__d_events_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x4198fd
test byte [0x4ee060], 0x80
je 0x419860
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], esi
mov dword [esp + 8], str.fdevent_process
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov dword [esp + 4], str.fdevent_process:_error_when_starting_a_hook_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x419860
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x419a9c
mov eax, dword [0x4ee060]
test al, 0x80
je 0x419bdb
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str._wait_for_all
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], esi
mov dword [esp + 4], str.Unable_to_allocate_thread_array_for__d_handles.
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x4ee060]
jmp 0x419bdb
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.fdevent_process
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], esi
mov dword [esp + 4], str.adb_win32:_got_one__index__d__n
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x419b29
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], esi
mov dword [esp + 8], str.fdevent_process
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov eax, dword [0x4ee444]
mov dword [esp + 4], str.handle_count__d_exceeds_MAXIMUM_WAIT_OBJECTS._n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov esi, dword [0x4ee444]
jmp 0x419919
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x34], eax
call sub.msvcrt.dll__getpid
mov edx, dword [ebp - 0x34]
mov dword [esp + 8], str._wait_for_all
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], str.Unable_to_create_a_waiting_thread__d_of__d._errno_d
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
jmp 0x419a75
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], edi
mov dword [esp + 8], str.fdevent_process
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
mov eax, dword [ebx + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 4]
mov dword [esp + 4], str.adb_win32:_signaling__s_for__x_n
add eax, 0x18
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
jmp 0x419b77
xor edx, edx
jmp 0x4199dc
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], esi
mov dword [esp + 8], str.fdevent_process
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
mov dword [esp + 4], str.fdevent_process:_nothing_to_wait_for____n
jmp 0x419d9c
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
jmp 0x419ad1
test byte [0x4ee060], 0x80
jne 0x41a1ec
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.0049e1d0
mov eax, dword [0x4ee060]
jmp 0x419bdb
call dword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [eax]
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call sub.msvcrt.dll__getpid
mov dword [esp + 0x10], esi
mov dword [esp + 8], str._wait_for_all
mov dword [esp + 4], 0x4b2138
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], str.Unable_to_create_main_event._Error:__d
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049e490
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ee068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebx
jmp 0x41a1d7