Function at 0x140108c30
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Inspect section memory permissions
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x168
mov rax, qword [rsp + 0x180]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140108c66
xor eax, eax
jmp 0x1401096d0
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
cmp dword [rax], 0x4550
je 0x140108c93
xor eax, eax
jmp 0x1401096d0
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 0x18]
mov dword [rsp + 0x90], eax
cmp dword [rsp + 0x90], 0x10b
je 0x140108cbf
cmp dword [rsp + 0x90], 0x20b
je 0x140108ccf
jmp 0x140108cde
xor eax, eax
cmp eax, 1
je 0x140108ccd
xor eax, eax
jmp 0x1401096d0
jmp 0x140108ce5
xor eax, eax
test eax, eax
je 0x140108cdc
xor eax, eax
jmp 0x1401096d0
jmp 0x140108ce5
xor eax, eax
jmp 0x1401096d0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0x18
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
jne 0x140108d13
xor eax, eax
jmp 0x1401096d0
mov rax, qword [rsp + 0x38]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x50]
mov dword [rsp + 0x68], eax
mov qword [rsp + 0x48], 0
mov eax, dword [rsp + 0x68]
mov r9d, 0x40
mov r8d, 0x2000
mov edx, eax
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0xe8], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0xe8]
mov qword [rax], rcx
cmp qword [rsp + 0xe8], 0
je 0x140108de7
mov eax, dword [rsp + 0x68]
mov r9d, 0x40
mov r8d, 0x1000
mov edx, eax
mov rcx, qword [rsp + 0xd8]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0xf0]
mov qword [rax], rcx
cmp qword [rsp + 0xf0], 0
je 0x140108dcc
mov dword [rsp + 0x94], 1
jmp 0x140108dd7
mov dword [rsp + 0x94], 0
mov eax, dword [rsp + 0x94]
mov dword [rsp + 0x98], eax
jmp 0x140108df2
mov dword [rsp + 0x98], 0
cmp dword [rsp + 0x98], 0
jne 0x140108ed4
mov eax, dword [rsp + 0x68]
mov r9d, 0x40
mov r8d, 0x2000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0xf8]
mov qword [rax], rcx
cmp qword [rsp + 0xf8], 0
je 0x140108ea2
mov eax, dword [rsp + 0x68]
mov r9d, 0x40
mov r8d, 0x1000
mov edx, eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x100], rax
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x100]
mov qword [rax], rcx
cmp qword [rsp + 0x100], 0
je 0x140108e87
mov dword [rsp + 0x9c], 1
jmp 0x140108e92
mov dword [rsp + 0x9c], 0
mov eax, dword [rsp + 0x9c]
mov dword [rsp + 0xa0], eax
jmp 0x140108ead
mov dword [rsp + 0xa0], 0
cmp dword [rsp + 0xa0], 0
jne 0x140108ed4
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x28]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x1401096d0
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x28]
mov rdi, qword [rcx]
mov rsi, qword [rsp + 0x70]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x54]
mov rcx, qword [rsp + 0x28]
mov rdi, qword [rcx + 8]
mov rsi, qword [rsp + 0x38]
mov ecx, eax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 8]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
mov qword [rax + 0x30], rcx
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x38]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0xb8], rax
mov dword [rsp + 0x34], 0
jmp 0x140108f8b
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x38]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x34], eax
jge 0x140109032
movsxd rax, dword [rsp + 0x34]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xb8]
mov eax, dword [rcx + rax + 0x24]
and eax, 0x80
test eax, eax
je 0x140108fbe
jmp 0x140108f81
movsxd rax, dword [rsp + 0x34]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xb8]
mov eax, dword [rcx + rax + 0xc]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x138], rax
movsxd rax, dword [rsp + 0x34]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0xb8]
mov eax, dword [rcx + rax + 0x10]
movsxd rcx, dword [rsp + 0x34]
imul rcx, rcx, 0x28
mov rdx, qword [rsp + 0xb8]
mov ecx, dword [rdx + rcx + 0x14]
mov rdx, qword [rsp + 0x180]
add rdx, rcx
mov rcx, rdx
mov rdi, qword [rsp + 0x138]
mov rsi, rcx
mov ecx, eax
rep movsb byte [rdi], byte [rsi]
jmp 0x140108f81
mov rax, qword [rsp + 0xd8]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
mov qword [rsp + 0x110], rax
mov eax, 8
imul rax, rax, 5
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx + rax + 0x88]
mov qword [rsp + 0xe0], rax
cmp qword [rsp + 0x110], 0
je 0x14010920d
cmp dword [rsp + 0xe0], 0
je 0x1401091da
mov eax, dword [rsp + 0xe0]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0xe4]
mov rcx, qword [rsp + 0x78]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x140], rax
mov rax, qword [rsp + 0x140]
cmp qword [rsp + 0x78], rax
jae 0x1401091d8
mov rax, qword [rsp + 0x78]
cmp dword [rax + 4], 0
je 0x1401091d8
mov rax, qword [rsp + 0x78]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x118], rax
mov rax, qword [rsp + 0x78]
add rax, 8
mov qword [rsp + 0x108], rax
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 4]
sub rax, 8
xor edx, edx
mov ecx, 2
div rcx
mov dword [rsp + 0xd4], eax
mov dword [rsp + 0x58], 0
jmp 0x140109137
mov eax, dword [rsp + 0x58]
inc eax
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0xd4]
cmp dword [rsp + 0x58], eax
jae 0x1401091bb
movsxd rax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x108]
movzx eax, word [rcx + rax*2]
sar eax, 0xc
mov word [rsp + 0x50], ax
movsxd rax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x108]
movzx eax, word [rcx + rax*2]
and eax, 0xfff
mov word [rsp + 0x54], ax
movzx eax, word [rsp + 0x50]
cmp eax, 0xa
je 0x14010918c
movzx eax, word [rsp + 0x50]
cmp eax, 3
jne 0x1401091b6
movzx eax, word [rsp + 0x54]
mov rcx, qword [rsp + 0x118]
mov rax, qword [rcx + rax]
add rax, qword [rsp + 0x110]
movzx ecx, word [rsp + 0x54]
mov rdx, qword [rsp + 0x118]
mov qword [rdx + rcx], rax
jmp 0x14010912d
mov rax, qword [rsp + 0x78]
mov eax, dword [rax + 4]
mov rcx, qword [rsp + 0x78]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
jmp 0x1401090b9
jmp 0x14010920d
mov r8d, 0x8000
xor edx, edx
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x28]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x1401096d0
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx + rax + 0x88]
mov qword [rsp + 0x120], rax
cmp dword [rsp + 0x120], 0
je 0x140109470
mov eax, dword [rsp + 0x120]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0x10], 0
je 0x140109470
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0xc], 0
jne 0x14010927a
mov rax, qword [rsp + 0x60]
add rax, 0x14
mov qword [rsp + 0x60], rax
jmp 0x140109250
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0xc]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x10]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
jne 0x1401092db
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsp + 0x128], rax
jmp 0x1401092f1
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov qword [rsp + 0x128], rax
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0x130], rax
cmp qword [rsp + 0x130], 0
jne 0x14010931f
mov rax, qword [rsp + 0x60]
add rax, 0x14
mov qword [rsp + 0x60], rax
jmp 0x140109250
mov rax, qword [rsp + 0x80]
cmp qword [rax], 0
je 0x14010945d
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xc8], 0
mov rax, qword [rsp + 0x80]
movabs rcx, 0x8000000000000000
mov rax, qword [rax]
and rax, rcx
test rax, rax
je 0x140109388
mov rax, qword [rsp + 0x80]
movabs rcx, 0x8000000000000000
mov rax, qword [rax]
xor rax, rcx
mov qword [rsp + 0xa8], rax
jmp 0x1401093ba
mov rax, qword [rsp + 0x80]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x148], rax
mov rax, qword [rsp + 0x148]
add rax, 2
mov qword [rsp + 0xa8], rax
cmp qword [rsp + 0xa8], 0
jne 0x1401093de
mov rax, qword [rsp + 0x80]
add rax, 8
mov qword [rsp + 0x80], rax
jmp 0x14010931f
cmp qword [rsp + 0x188], 0
je 0x140109408
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xc0]
call qword [rsp + 0x188]
mov qword [rsp + 0xc8], rax
cmp qword [rsp + 0xc8], 0
jne 0x140109431
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x130]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0xc8], rax
mov rax, qword [rsp + 0x80]
mov rcx, qword [rsp + 0xc8]
mov qword [rax], rcx
mov rax, qword [rsp + 0x80]
add rax, 8
mov qword [rsp + 0x80], rax
jmp 0x14010931f
mov rax, qword [rsp + 0x60]
add rax, 0x14
mov qword [rsp + 0x60], rax
jmp 0x140109250
mov rax, qword [rsp + 0x48]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0xb0]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0xb0]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x24], 0
jmp 0x1401094c1
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0xb0]
movzx eax, word [rax + 6]
cmp dword [rsp + 0x24], eax
jge 0x1401096af
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0xc]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x150], rax
mov dword [rsp + 0x6c], 0
mov dword [rsp + 0xd0], 0
mov dword [rsp + 0x40], 0
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x24]
and eax, 0x20000000
test eax, eax
je 0x14010953f
mov byte [rsp + 0x20], 1
jmp 0x140109544
mov byte [rsp + 0x20], 0
movzx eax, byte [rsp + 0x20]
mov byte [rsp + 0x30], al
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x24]
and eax, 0x40000000
test eax, eax
je 0x140109572
mov byte [rsp + 0x21], 1
jmp 0x140109577
mov byte [rsp + 0x21], 0
movzx eax, byte [rsp + 0x21]
mov byte [rsp + 0x31], al
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x24]
and eax, 0x80000000
test eax, eax
je 0x1401095a5
mov byte [rsp + 0x22], 1
jmp 0x1401095aa
mov byte [rsp + 0x22], 0
movzx eax, byte [rsp + 0x22]
mov byte [rsp + 0x32], al
movzx eax, byte [rsp + 0x30]
imul rax, rax, 0x10
lea rcx, [0x1403a6c98]
add rcx, rax
mov rax, rcx
movzx ecx, byte [rsp + 0x31]
lea rax, [rax + rcx*8]
movzx ecx, byte [rsp + 0x32]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0x6c], eax
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x24]
and eax, 0x4000000
test eax, eax
je 0x140109608
mov eax, dword [rsp + 0x6c]
bts eax, 9
mov dword [rsp + 0x6c], eax
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x10]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
jne 0x140109682
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x24]
and eax, 0x40
test eax, eax
je 0x140109655
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x20]
mov dword [rsp + 0x40], eax
jmp 0x140109682
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x28
mov rcx, qword [rsp + 0x88]
mov eax, dword [rcx + rax + 0x24]
and eax, 0x80
test eax, eax
je 0x140109682
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x24]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x1401096aa
mov eax, dword [rsp + 0x40]
lea r9, [rsp + 0xd0]
mov r8d, dword [rsp + 0x6c]
mov edx, eax
mov rcx, qword [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1401094b7
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x28]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x10], rax
mov rax, qword [rsp + 0x28]
add rsp, 0x168
pop rdi
pop rsi
ret