Function at 0x415fb0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 8]
cmp esi, 0x10000
ja 0x4161d0
mov eax, dword [ebx + 4]
test eax, eax
je 0x416011
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 0x416023
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
xor eax, eax
test esi, esi
jne 0x416031
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._memset
test bl, 1
mov edx, ebx
mov ecx, 0x1c
jne 0x4161e6
test dl, 2
jne 0x4161f3
mov edi, ecx
xor eax, eax
and edi, 0xfffffffc
mov dword [edx + eax], 0
add eax, 4
cmp eax, edi
jb 0x41606b
add edx, eax
test cl, 2
jne 0x4161c0
and ecx, 1
jne 0x4161b3
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0
mov dword [0x488dbc], eax
mov eax, dword [ebp + 0x14]
mov dword [0x488dc0], eax
mov eax, dword [ebp + 0x10]
shr eax, 1
shld edx, eax, 0x10
shl eax, 0x10
mov dword [esp], eax
mov dword [esp + 4], edx
call dbg.__udivdi3
mov ecx, dword [ebp + 0x14]
mov dword [0x488dc8], esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ecx + eax*2]
mov dword [0x488dc4], eax
call esi
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, eax
call esi
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
sub esp, 0x1c
test eax, eax
je 0x416204
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 [ebx + 8], eax
je 0x416251
lea eax, [ebp - 0x1c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], dbg.profthr_func
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0x18
test eax, eax
mov dword [ebx + 4], eax
je 0x41621a
mov dword [esp + 4], 0xf
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor eax, eax
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [edx], 0
jmp 0x41608d
xor edi, edi
add edx, 2
mov word [edx - 2], di
jmp 0x416084
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x16
mov eax, 0xffffffff
jmp 0x416029
mov byte [ebx], 0
lea edx, [ebx + 1]
mov cl, 0x1b
jmp 0x41605b
xor eax, eax
add edx, 2
mov word [edx - 2], ax
sub ecx, 2
jmp 0x416064
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 3
mov eax, 0xffffffff
jmp 0x416029
mov eax, dword [ebx]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call esi
mov eax, dword [ebx + 8]
sub esp, 4
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xb
mov eax, 0xffffffff
jmp 0x416029
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416232