Function at 0x1400358f0
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call
Get system information on windows
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x148
cmp qword [rsp + 0x150], 0
jne 0x140035916
mov eax, 1
jmp 0x140036146
mov rax, qword [rsp + 0x150]
mov qword [rsp + 0x20], rax
mov edx, 0x40
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x140035947
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
cmp eax, 0x5a4d
je 0x140035951
mov eax, 2
jmp 0x140036146
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov edx, 0x108
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x14003598c
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x140035996
mov eax, 3
jmp 0x140036146
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x14]
cmp rax, 0xf0
jne 0x1400359b7
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
je 0x1400359c1
mov eax, 4
jmp 0x140036146
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 6]
cmp eax, 1
jge 0x1400359d9
mov eax, 5
jmp 0x140036146
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 0x14]
mov rcx, qword [rsp + 0x28]
lea rax, [rcx + rax + 0x18]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0xf0], 0x28
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x28]
movzx ecx, word [rcx + 6]
mov rdx, qword [rsp + 0xf0]
imul rdx, rcx
mov rcx, rdx
add rax, rcx
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x30], 0
jmp 0x140035a5e
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 6]
cmp qword [rsp + 0x30], rax
jge 0x140035af4
imul rax, qword [rsp + 0x30], 0x28
imul rcx, qword [rsp + 0x30], 0x28
mov rdx, qword [rsp + 0x40]
mov eax, dword [rdx + rax + 0xc]
mov rdx, qword [rsp + 0x40]
add eax, dword [rdx + rcx + 0x10]
mov eax, eax
cmp qword [rsp + 0x78], rax
jge 0x140035abe
imul rax, qword [rsp + 0x30], 0x28
imul rcx, qword [rsp + 0x30], 0x28
mov rdx, qword [rsp + 0x40]
mov eax, dword [rdx + rax + 0xc]
mov rdx, qword [rsp + 0x40]
add eax, dword [rdx + rcx + 0x10]
mov eax, eax
mov qword [rsp + 0x78], rax
mov eax, 8
imul rax, rax, 2
imul rcx, qword [rsp + 0x30], 0x28
mov rdx, qword [rsp + 0x28]
mov r8, qword [rsp + 0x40]
mov ecx, dword [r8 + rcx + 0xc]
cmp dword [rdx + rax + 0x88], ecx
jne 0x140035aef
movsxd rax, dword [rsp + 0x30]
mov qword [rsp + 0x60], rax
jmp 0x140035a51
lea rcx, [rsp + 0x108]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rsp + 0x10c]
mov qword [rsp + 0x100], rax
mov rax, qword [rsp + 0x78]
cqo
mov rcx, qword [rsp + 0x100]
idiv rcx
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x10c]
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0x78]
cqo
mov rcx, qword [rsp + 0xd0]
idiv rcx
mov rax, rdx
test rax, rax
je 0x140035b67
mov rax, qword [rsp + 0x80]
inc rax
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x10c]
mov rcx, qword [rsp + 0x80]
imul rcx, rax
mov rax, rcx
mov qword [rsp + 0xb8], rax
mov r9d, 0x40
mov r8d, 0x1000
mov rdx, qword [rsp + 0xb8]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x158], rax
cmp qword [rsp + 0x158], 0
jne 0x140035bbe
mov eax, 6
jmp 0x140036146
mov r8, qword [rsp + 0x90]
mov rdx, qword [rsp + 0x150]
mov rcx, qword [rsp + 0x158]
call fcn.140045dd0
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0x30], 0
jmp 0x140035c17
mov rax, qword [rsp + 0x30]
inc rax
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x28]
movzx eax, word [rax + 6]
cmp qword [rsp + 0x30], rax
jge 0x140035cae
imul rax, qword [rsp + 0x30], 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 0xc]
mov rcx, qword [rsp + 0x158]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0xa0], rax
imul rax, qword [rsp + 0x30], 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 0x14]
mov rcx, qword [rsp + 0x150]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x98], rax
imul rax, qword [rsp + 0x30], 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 0x10]
mov qword [rsp + 0xa8], rax
mov r8, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0xa0]
call fcn.140045dd0
jmp 0x140035c0a
mov rax, qword [rsp + 0x158]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
add rax, 0x108
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x20]
mov qword [0x14017eab8], rax
cmp qword [rsp + 0x60], 0
je 0x140035d4e
call fcn.1400354f0
cmp eax, 1
jne 0x140035d4e
imul rax, qword [rsp + 0x60], 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 0xc]
add rax, qword [rsp + 0x150]
imul rcx, qword [rsp + 0x60], 0x28
mov rdx, qword [rsp + 0x40]
mov dword [rdx + rcx + 0xc], eax
imul rax, qword [rsp + 0x60], 0x28
mov rcx, qword [rsp + 0x40]
mov eax, dword [rcx + rax + 0x14]
add rax, qword [rsp + 0x150]
imul rcx, qword [rsp + 0x60], 0x28
mov rdx, qword [rsp + 0x40]
mov dword [rdx + rcx + 0x14], eax
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x28]
mov eax, dword [rcx + rax + 0x88]
mov qword [rsp + 0xe0], rax
cmp qword [rsp + 0xe0], 0
jne 0x140035d93
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 7
jmp 0x140036146
mov eax, 8
imul rax, rax, 1
mov rcx, qword [rsp + 0x28]
mov eax, dword [rcx + rax + 0x88]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x140035dcc
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
jmp 0x140035de9
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 8
jmp 0x140036146
xor eax, eax
cmp eax, 1
je 0x140035fb1
mov rax, qword [rsp + 0x48]
cmp dword [rax + 4], 0
jne 0x140035e0f
mov rax, qword [rsp + 0x48]
cmp dword [rax + 0xc], 0
jne 0x140035e0f
jmp 0x140035fb1
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0xc]
add rax, qword [0x14017eab8]
mov qword [rsp + 0xc0], rax
mov rdx, qword [rsp + 0xc0]
xor ecx, ecx
call fcn.140033250
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
jne 0x140035e52
jmp 0x140035f9e
mov rax, qword [rsp + 0x48]
cmp dword [rax], 0
je 0x140035e83
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
add rax, qword [rsp + 0x20]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
add rax, qword [rsp + 0x20]
mov qword [rsp + 0xc8], rax
jmp 0x140035eaa
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x10]
add rax, qword [rsp + 0x20]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x10]
add rax, qword [rsp + 0x20]
mov qword [rsp + 0xc8], rax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x10]
add rax, qword [rsp + 0x20]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x58]
cmp qword [rax], 0
je 0x140035f9e
movabs rax, 0x8000000000000000
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xd8]
mov rax, qword [rax]
and rax, rcx
test rax, rax
je 0x140035f1e
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
and rax, 0xffff
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsp + 0x70]
mov qword [rcx], rax
jmp 0x140035f58
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
add rax, qword [rsp + 0x20]
mov qword [rsp + 0xe8], rax
mov rax, qword [rsp + 0xe8]
add rax, 2
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsp + 0x70]
mov qword [rcx], rax
cmp qword [rsp + 0x70], 0
jne 0x140035f7d
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x140036146
mov rax, qword [rsp + 0x70]
add rax, 8
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x58]
add rax, 8
mov qword [rsp + 0x58], rax
jmp 0x140035ebc
mov rax, qword [rsp + 0x48]
add rax, 0x14
mov qword [rsp + 0x48], rax
jmp 0x140035de9
mov eax, 8
imul rax, rax, 5
mov rcx, qword [rsp + 0x28]
mov eax, dword [rcx + rax + 0x88]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x1400360fd
mov rax, qword [rsp + 0x20]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
cmp dword [rax], 0
je 0x1400360fd
mov rax, qword [rsp + 0x50]
add rax, 8
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 4]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
cmp qword [rsp + 0x68], rax
jae 0x1400360e0
mov rax, qword [rsp + 0x68]
movzx eax, word [rax]
and eax, 0xf000
mov word [rsp + 0x38], ax
movzx eax, word [rsp + 0x38]
cmp eax, 0xa000
je 0x140036050
movzx eax, word [rsp + 0x38]
cmp eax, 0x3000
jne 0x1400360aa
mov rax, qword [rsp + 0x50]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x68]
movzx ecx, word [rcx]
and ecx, 0xfff
movsxd rcx, ecx
add rax, rcx
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0xb0]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x20]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0x28]
sub rax, qword [rcx + 0x30]
mov rcx, qword [rsp + 0xb0]
mov qword [rcx], rax
jmp 0x1400360cd
movzx eax, word [rsp + 0x38]
test eax, eax
je 0x1400360cd
mov r8d, 0x8000
xor edx, edx
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x140036146
mov rax, qword [rsp + 0x68]
add rax, 2
mov qword [rsp + 0x68], rax
jmp 0x140036008
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 4]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
jmp 0x140035fec
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x28]
add rax, qword [rsp + 0x20]
mov qword [0x14017eaa8], rax
mov qword [rsp + 0xf8], 0
mov r8, qword [rsp + 0xf8]
mov edx, 1
mov rcx, qword [rsp + 0x20]
call qword [0x14017eaa8]
mov rax, qword [rsp + 0x158]
mov qword [0x14017eaa0], rax
xor eax, eax
add rsp, 0x148
ret