Function at 0x4f8e40
Capabilities:
Create process on windows
Get process heap flags
Resolve function by parsing pe exports
Resume thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov ecx, dword [ebp + 8]
lea edx, [esp - 0x60]
sub esp, 0x6c
push ebx
push esi
push edi
sub esp, 8
call fcn.0051af40
test eax, eax
jns 0x4f8e6b
lfence
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4f8e91
movzx eax, word [edx]
mov word [esp + 0x20], ax
add eax, 2
cmp dword [edx], 0xfffe
mov word [esp + 0x22], ax
mov eax, dword [edx + 4]
mov dword [esp + 0x24], eax
ja 0x4f8eb7
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4f8ec5
movzx eax, word [esi]
mov word [esp + 0x28], ax
add eax, 2
cmp dword [esi], 0xfffe
mov word [esp + 0x2a], ax
mov eax, dword [esi + 4]
mov dword [esp + 0x2c], eax
jbe 0x4f8ec5
mov eax, 0xc0000106
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x4f8ed8
mov edi, dword [ecx + 4]
mov eax, dword [ecx + 8]
test edi, edi
jne 0x4f8ede
jmp 0x4f8eda
xor eax, eax
lea edi, [esp + 0x18]
nop
test eax, eax
jne 0x4f8ef3
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x10]
add eax, 0x78
test ecx, ecx
je 0x4f8f10
mov esi, dword [ecx + 0xc]
mov ebx, dword [ecx + 0x10]
mov ecx, dword [ecx]
mov dword [esp + 0x14], esi
mov esi, dword [ebp + 0x14]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x14]
jmp 0x4f8f18
xor ebx, ebx
xor ecx, ecx
mov dword [esp + 0xc], ecx
push ebx
push ecx
push eax
push edi
push dword [ebp + 0x10]
test edx, edx
lea ecx, [esp + 0x2c]
lea eax, [esp + 0x34]
cmove eax, ecx
xor ecx, ecx
push eax
test esi, esi
lea eax, [esp + 0x40]
cmove eax, ecx
push eax
push dword [esp + 0x28]
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.ntdll.dll_RtlCreateProcessParameters]
mov ebx, dword [ebp + 0x1c]
mov esi, eax
test esi, esi
js 0x4f8f99
lea eax, [esp + 0x30]
push eax
push 0
push 0
mov al, bl
and al, 1
movzx eax, al
push eax
push dword [ebp + 0x20]
lea eax, [esp + 0x2c]
push 0
push 0
push dword [esp + 0x2c]
push 0x40
push eax
call dword [sym.imp.ntdll.dll_RtlCreateUserProcess]
push dword [esp + 0x10]
mov esi, eax
mov eax, dword fs:[0x18]
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword ds:[esp + 0x1c]
test eax, eax
je 0x4f8fc2
push eax
mov eax, dword fs:[0x18]
push 0
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
xorps xmm0, xmm0
movlpd qword [esp + 0x18], xmm0
test esi, esi
js 0x4f9028
test bl, 4
jne 0x4f8fd7
push 0
push dword [esp + 0x3c]
call dword [sym.imp.ntdll.dll_NtResumeThread]
mov edx, dword [ebp + 0x24]
test edx, edx
je 0x4f8feb
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov ecx, dword [ebp + 0x28]
test ecx, ecx
je 0x4f8ffa
mov eax, dword [esp + 0x34]
mov dword [ecx], eax
jmp 0x4f9006
push dword ds:[esp + 0x34]
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, dword [ebp + 0x2c]
test ecx, ecx
je 0x4f901e
mov eax, dword [esp + 0x38]
mov dword [ecx], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
push dword [esp + 0x38]
call dword [sym.imp.ntdll.dll_NtClose]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28