Function at 0x408aa0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
mov esi, ecx
xor ecx, ecx
push edi
mov edi, eax
mov eax, dword [esi + 4]
mov ebx, dword [edi + 8]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], eax
mov eax, dword [esi]
add ebx, 0x20
mov dword [ebp - 8], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 0x486f88
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
cmp dword [ebp + 8], ecx
jne 0x408ae4
lea eax, [ebp - 0x44]
mov dword [ebp + 8], eax
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x408ccc
mov ecx, dword [edi + 8]
add ecx, 0xc
push ecx
add eax, 0x14
push edi
push eax
call sub.msvcrt.dll_memcpy
push 4
push ebx
lea edi, [ebp - 0x20]
call fcn.0040695f
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 0x14
test eax, eax
je 0x408cc7
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00406657
add esp, 0xc
test eax, eax
je 0x408cbf
mov eax, dword [esi + 4]
mov ecx, dword [eax]
dec ecx
je 0x408bac
dec ecx
dec ecx
jne 0x408cbf
mov eax, dword [ebp - 0x20]
push eax
push dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
push str.Th____p_nDa____p_n
call fcn.00407017
xor ebx, ebx
push ebx
push ebx
push 8
lea eax, [ebp - 0x28]
push eax
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
push 0x22c1c3
push dword [eax]
xor esi, esi
call fcn.00405a30
add esp, 0x24
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x408c3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_remotelib_create___kull_m_kernel_ioctl_handle__0x_08x__n
call fcn.00407017
pop ecx
pop ecx
jmp 0x408c32
mov eax, dword [eax + 4]
xor ebx, ebx
cmp dword [0x4872e0], 5
push ebx
jbe 0x408be4
lea ecx, [ebp - 0xc]
push ecx
push dword [ebp - 0x20]
push dword [esi]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [eax]
call sub.ntdll.dll_RtlCreateUserThread
cmp eax, ebx
jge 0x408c10
push eax
push str.ERROR_kull_m_remotelib_create___RtlCreateUserThread__0x_08x__n
mov dword [ebp - 0xc], ebx
call fcn.00407017
jmp 0x408c0e
push ebx
push dword [ebp - 0x20]
push dword [esi]
push ebx
push ebx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0xc], eax
cmp eax, ebx
jne 0x408c1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_kull_m_remotelib_create___CreateRemoteThread__0x_08x__n
call fcn.00407017
xor ebx, ebx
pop ecx
pop ecx
mov eax, dword [ebp - 0xc]
cmp eax, ebx
je 0x408cbf
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], eax
xor ebx, ebx
cmp dword [ebp - 8], ebx
je 0x408cbf
mov esi, dword [ebp + 8]
push 0x14
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x18], esi
call fcn.00406657
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x408cbf
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x30], eax
cmp eax, ebx
je 0x408cbf
lea eax, [ebp - 0x44]
cmp esi, eax
je 0x408cb7
mov eax, dword [esi + 0xc]
mov dword [ebp - 8], ebx
mov dword [esi + 0x10], ebx
cmp eax, ebx
je 0x408cb4
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x408cb4
push dword [esi + 0xc]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.00406657
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x408caa
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x10], eax
jmp 0x408caf
push dword [ebp - 0x18]
call edi
cmp dword [ebp - 8], ebx
jne 0x408cb7
mov dword [esi + 0xc], ebx
lea ecx, [ebp - 0x30]
call fcn.004069dc
lea ecx, [ebp - 0x20]
call fcn.004069dc
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret