Function at 0x140022050
Capabilities:
Enumerate pe sections
Parse pe header
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xa8
mov dword [rsp + 0x38], 0
mov ecx, 0x1000
call fcn.1400435b8
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x140022091
xor eax, eax
jmp 0x1400222f6
mov dword [rsp + 0x3c], 0x1000
xor eax, eax
cmp eax, 1
je 0x1400222c5
mov dword [rsp + 0x54], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x54]
mov r8d, dword [rsp + 0x3c]
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400220db
jmp 0x1400222c5
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
movsxd rcx, dword [rax + 0x3c]
mov rax, qword [rsp + 0x30]
add rax, rcx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x48]
movzx eax, word [rax]
cmp eax, 0x5a4d
jne 0x140022117
mov rax, qword [rsp + 0x58]
cmp dword [rax], 0x4550
je 0x14002211c
jmp 0x1400222c5
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x40], 0
mov rax, qword [rsp + 0x58]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x1400221de
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
mov eax, dword [rsp + 0x3c]
cmp dword [rcx + 0x54], eax
jbe 0x1400221b4
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x54]
mov dword [rsp + 0x3c], eax
cmp dword [rsp + 0x3c], 0x100000
jbe 0x140022174
jmp 0x1400222c5
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x70]
call fcn.140043518
mov ecx, dword [rsp + 0x3c]
call fcn.1400435b8
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x1400221af
xor eax, eax
jmp 0x1400222f6
jmp 0x140022099
mov rax, qword [rsp + 0x60]
movzx eax, word [rax + 6]
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x60]
movzx ecx, word [rax + 0x14]
mov rax, qword [rsp + 0x60]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x40], rax
jmp 0x140022278
mov rcx, qword [rsp + 0x58]
mov eax, dword [rsp + 0x3c]
cmp dword [rcx + 0x54], eax
jbe 0x140022253
mov rax, qword [rsp + 0x58]
mov eax, dword [rax + 0x54]
mov dword [rsp + 0x3c], eax
cmp dword [rsp + 0x3c], 0x100000
jbe 0x140022207
jmp 0x1400222c5
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0x80]
call fcn.140043518
mov ecx, dword [rsp + 0x3c]
call fcn.1400435b8
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x14002224e
xor eax, eax
jmp 0x1400222f6
jmp 0x140022099
mov rax, qword [rsp + 0x58]
movzx eax, word [rax + 6]
mov dword [rsp + 0x50], eax
mov rax, qword [rsp + 0x58]
movzx ecx, word [rax + 0x14]
mov rax, qword [rsp + 0x58]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x1400222be
mov eax, dword [rsp + 0x50]
sub eax, 1
mov ecx, eax
imul rcx, rcx, 0x28
mov eax, dword [rsp + 0x50]
sub eax, 1
mov edx, eax
imul rdx, rdx, 0x28
mov rax, qword [rsp + 0x40]
mov ecx, dword [rax + rcx + 0x14]
mov rax, qword [rsp + 0x40]
add ecx, dword [rax + rdx + 0x10]
mov rax, qword [rsp + 0xb8]
mov dword [rax], ecx
mov dword [rsp + 0x38], 1
jmp 0x1400222c5
jmp 0x1400222cf
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x90], rax
mov rcx, qword [rsp + 0x90]
call fcn.140043518
mov qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x38]
add rsp, 0xa8
ret