Function at 0x417200
Capabilities:
Create thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov esi, dword [esp + 0x60]
mov ebx, dword [esp + 0x50]
cmp esi, 0x10000
ja 0x4173f0
mov eax, dword [ebx + 4]
test eax, eax
je 0x417261
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SignalObjectAndWait]
mov eax, dword [ebx + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 0x10
mov dword [esp], eax
call edi
mov eax, dword [ebx + 4]
sub esp, 4
mov dword [esp], eax
call edi
sub esp, 4
mov eax, dword [ebx]
test eax, eax
je 0x417273
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
xor eax, eax
test esi, esi
jne 0x417281
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x58]
mov dword [esp + 4], 0
xor edi, edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [esp], eax
call sub.msvcrt.dll_memset
lea ecx, [ebx + 4]
mov edx, ebx
mov dword [ebx], 0
and ecx, 0xfffffffc
mov dword [ebx + 0x18], 0
xor eax, eax
sub edx, ecx
add edx, 0x1c
and edx, 0xfffffffc
mov dword [ecx + eax], edi
add eax, 4
cmp eax, edx
jb 0x4172be
mov eax, dword [esp + 0x54]
xor ebp, ebp
mov dword [esp + 8], esi
mov edx, ebp
mov dword [esp + 0xc], 0
mov dword [0x448ac8], eax
mov eax, dword [esp + 0x5c]
mov dword [0x448acc], eax
mov eax, dword [esp + 0x58]
shr eax, 1
shld edx, eax, 0x10
shl eax, 0x10
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0041ca40
mov ecx, dword [esp + 0x5c]
mov dword [0x448ad4], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ecx + eax*2]
mov dword [0x448ad0], eax
call esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
call esi
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x417405
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
mov dword [ebx + 8], eax
test eax, eax
je 0x41744e
lea eax, [esp + 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], sym.aIcEEC2ERKS4_jjRKS3_
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0x18
mov dword [ebx + 4], eax
test eax, eax
je 0x41741a
mov dword [esp + 4], 0xf
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor eax, eax
sub esp, 8
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0x16
mov eax, 0xffffffff
jmp 0x417279
call sub.msvcrt.dll__errno
mov dword [eax], 3
mov eax, 0xffffffff
jmp 0x417279
mov eax, dword [ebx]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
push eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call esi
mov dword [ebx], 0
sub esp, 4
call sub.msvcrt.dll__errno
mov dword [eax], 0xb
mov eax, 0xffffffff
jmp 0x417279
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x417430