Function at 0x4f7020
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.0051a160
test eax, eax
jns 0x4f704b
lfence
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4f7071
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 0x4f7097
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4f70a5
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 0x4f70a5
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 0x4f70b8
mov edi, dword [ecx + 4]
mov eax, dword [ecx + 8]
test edi, edi
jne 0x4f70be
jmp 0x4f70ba
xor eax, eax
lea edi, [esp + 0x18]
mov edi, edi
test eax, eax
jne 0x4f70d3
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x10]
add eax, 0x78
test ecx, ecx
je 0x4f70f0
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 0x4f70f8
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 0x4f7179
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 0x4f71a9
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]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
test esi, esi
js 0x4f720e
test bl, 4
jne 0x4f71be
push 0
push dword [esp + 0x3c]
call dword [sym.imp.ntdll.dll_NtResumeThread]
mov edx, dword [ebp + 0x24]
test edx, edx
je 0x4f71d2
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 0x4f71e2
mov eax, dword ds:[esp + 0x34]
mov dword [ecx], eax
jmp 0x4f71ec
push dword [esp + 0x34]
call dword [sym.imp.ntdll.dll_NtClose]
mov ecx, dword [ebp + 0x2c]
test ecx, ecx
je 0x4f7204
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