Function at 0x14002a7d0
Capabilities:
Check if file exists
Enumerate pe sections
Get file size
Parse pe header
Read file via mapping

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x480
mov qword [rsp + 0x450], 0xfffffffffffffffe
mov rax, qword [0x14007a9b0]
xor rax, rsp
mov qword [rsp + 0x470], rax
mov dword [rsp + 0x278], 0
lea rdi, [rsp + 0x60]
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov r8d, 0x104
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x498]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14002a848
xor eax, eax
jmp 0x14002b130
mov qword [rsp + 0x270], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov rax, qword [rsp + 0x490]
mov dword [rax + 0x40], 0
mov rcx, qword [rsp + 0x490]
add rcx, 0xe0
call fcn.140030c40
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x270], rax
cmp qword [rsp + 0x270], 0xffffffffffffffff
jne 0x14002a8d3
jmp 0x14002b0b4
xor edx, edx
mov rcx, qword [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
mov rax, qword [rsp + 0x490]
mov dword [rax + 0x44], edx
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14002a92c
jmp 0x14002b0b4
mov rax, qword [rsp + 0x490]
mov eax, dword [rax + 0x44]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x14002a964
jmp 0x14002b0b4
cmp qword [rsp + 0x48], 0
je 0x14002a97f
mov rcx, qword [rsp + 0x48]
call fcn.1400299e0
mov qword [rsp + 0x48], 0
cmp qword [rsp + 0x270], 0
je 0x14002a9a3
mov rcx, qword [rsp + 0x270]
call fcn.1400299e0
mov qword [rsp + 0x270], 0
mov qword [rsp + 0x2c8], 0
mov qword [rsp + 0x280], 0
mov qword [rsp + 0x2d8], 0
mov dword [rsp + 0x28c], 0
mov qword [rsp + 0x2f0], 0
mov dword [rsp + 0x2c0], 0
mov dword [rsp + 0x2e8], 0
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x2c8], rax
mov rax, qword [rsp + 0x2c8]
movsxd rcx, dword [rax + 0x3c]
mov rax, qword [rsp + 0x40]
add rax, rcx
mov qword [rsp + 0x280], rax
mov rax, qword [rsp + 0x2c8]
movzx eax, word [rax]
cmp eax, 0x5a4d
jne 0x14002aa3f
mov rax, qword [rsp + 0x280]
cmp dword [rax], 0x4550
je 0x14002aa44
jmp 0x14002b0b4
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 0x16]
and eax, 0x2000
test eax, eax
je 0x14002aa66
mov dword [rsp + 0x458], 1
jmp 0x14002aa71
mov dword [rsp + 0x458], 0
mov rcx, qword [rsp + 0x490]
mov eax, dword [rsp + 0x458]
mov dword [rcx + 0x10], eax
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 0x18]
cmp eax, 0x10b
jne 0x14002aaa7
mov rax, qword [rsp + 0x490]
mov dword [rax + 0xc], 0
jmp 0x14002aad9
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x14002aad9
mov rax, qword [rsp + 0x490]
mov dword [rax + 0xc], 1
mov rax, qword [rsp + 0x280]
mov qword [rsp + 0x2d8], rax
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 6]
mov dword [rsp + 0x2d0], eax
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 0x14]
mov dword [rsp + 0x288], eax
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x14002ab99
mov rax, qword [rsp + 0x490]
mov dword [rax + 0xc], 1
mov rax, qword [rsp + 0x280]
mov qword [rsp + 0x2d8], rax
mov rax, qword [rsp + 0x498]
mov qword [rsp + 0x2f0], rax
mov rax, qword [rsp + 0x2d8]
mov eax, dword [rax + 0x38]
mov dword [rsp + 0x2c0], eax
mov rax, qword [rsp + 0x2d8]
mov eax, dword [rax + 0x54]
mov dword [rsp + 0x2e8], eax
mov rcx, qword [rsp + 0x490]
mov rax, qword [rsp + 0x2d8]
mov rax, qword [rax + 0x30]
mov qword [rcx + 0x58], rax
mov rcx, qword [rsp + 0x490]
mov rax, qword [rsp + 0x2d8]
mov eax, dword [rax + 0x50]
mov dword [rcx + 0x48], eax
jmp 0x14002abf3
mov eax, dword [rsp + 0x498]
mov dword [rsp + 0x28c], eax
mov rax, qword [rsp + 0x280]
mov eax, dword [rax + 0x38]
mov dword [rsp + 0x2c0], eax
mov rax, qword [rsp + 0x280]
mov eax, dword [rax + 0x54]
mov dword [rsp + 0x2e8], eax
mov rax, qword [rsp + 0x280]
mov eax, dword [rax + 0x34]
mov dword [rsp + 0x28c], eax
mov rcx, qword [rsp + 0x490]
mov rax, qword [rsp + 0x280]
mov eax, dword [rax + 0x50]
mov dword [rcx + 0x48], eax
mov rcx, qword [rsp + 0x490]
mov rax, qword [rsp + 0x490]
mov eax, dword [rax + 0x48]
mov dword [rcx + 0x40], eax
mov ecx, dword [rsp + 0x2e8]
lea rdx, [0x14007d470]
call fcn.14004ce20
mov qword [rsp + 0x340], rax
mov rcx, qword [rsp + 0x490]
mov rax, qword [rsp + 0x340]
mov qword [rcx + 0x68], rax
mov rax, qword [rsp + 0x490]
cmp qword [rax + 0x68], 0
jne 0x14002ac4c
jmp 0x14002b0b4
mov r8d, dword [rsp + 0x2e8]
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x490]
mov rcx, qword [rcx + 0x68]
call fcn.14004c0a0
mov rax, qword [rsp + 0x490]
mov rax, qword [rax + 0x68]
mov qword [rsp + 0x2e0], rax
mov rax, qword [rsp + 0x490]
cmp dword [rax + 0xc], 0
jne 0x14002acb5
mov rax, qword [rsp + 0x2e0]
movsxd rcx, dword [rax + 0x3c]
mov rax, qword [rsp + 0x490]
add rcx, qword [rax + 0x68]
mov rax, qword [rsp + 0x490]
mov qword [rax + 0xd0], rcx
jmp 0x14002acdc
mov rax, qword [rsp + 0x2e0]
movsxd rcx, dword [rax + 0x3c]
mov rax, qword [rsp + 0x490]
add rcx, qword [rax + 0x68]
mov rax, qword [rsp + 0x490]
mov qword [rax + 0xd8], rcx
lea rcx, [rsp + 0x298]
call fcn.140003230
nop
lea rdi, [rsp + 0x2a0]
xor eax, eax
mov ecx, 0x20
rep stosb byte [rdi], al
mov eax, dword [rsp + 0x2e8]
mov dword [rsp + 0x2a8], eax
mov eax, dword [rsp + 0x2e8]
mov dword [rsp + 0x2ac], eax
cmp dword [rsp + 0x2c0], 0
je 0x14002ad59
mov ecx, dword [rsp + 0x2e8]
mov eax, dword [rsp + 0x2c0]
lea eax, [rcx + rax - 1]
xor edx, edx
div dword [rsp + 0x2c0]
mov dword [rsp + 0x2f8], eax
mov eax, dword [rsp + 0x2f8]
imul eax, dword [rsp + 0x2c0]
mov dword [rsp + 0x2a8], eax
mov rax, qword [rsp + 0x490]
cmp dword [rax + 0xc], 0
je 0x14002ad79
mov rax, qword [rsp + 0x2f0]
mov qword [rsp + 0x2a0], rax
jmp 0x14002ad87
mov eax, dword [rsp + 0x28c]
mov dword [rsp + 0x2a0], eax
mov dword [rsp + 0x2b0], 0
mov eax, dword [rsp + 0x2e8]
mov dword [rsp + 0x2b4], eax
lea rdx, str.PE_Header
lea rcx, [rsp + 0x298]
call fcn.140003450
mov dword [rsp + 0x2bc], 0x40000000
mov rcx, qword [rsp + 0x490]
add rcx, 0xe0
lea rdx, [rsp + 0x298]
call fcn.140030bc0
mov qword [rsp + 0x290], 0
mov rax, qword [rsp + 0x490]
cmp dword [rax + 0xc], 0
je 0x14002ae18
mov rax, qword [rsp + 0x2d8]
movzx ecx, word [rax + 0x14]
mov rax, qword [rsp + 0x2d8]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x290], rax
jmp 0x14002ae39
mov rax, qword [rsp + 0x280]
movzx ecx, word [rax + 0x14]
mov rax, qword [rsp + 0x280]
lea rax, [rax + rcx + 0x18]
mov qword [rsp + 0x290], rax
mov dword [rsp + 0x2fc], 0
jmp 0x14002ae57
mov eax, dword [rsp + 0x2fc]
add eax, 1
mov dword [rsp + 0x2fc], eax
mov eax, dword [rsp + 0x2d0]
cmp dword [rsp + 0x2fc], eax
jge 0x14002b09d
lea rcx, [rsp + 0x300]
call fcn.140003230
nop
lea rdi, [rsp + 0x308]
xor eax, eax
mov ecx, 0x20
rep stosb byte [rdi], al
lea rdi, [rsp + 0x328]
xor eax, eax
mov ecx, 9
rep stosb byte [rdi], al
mov r8d, 9
xor edx, edx
lea rcx, [rsp + 0x328]
call fcn.14004d750
movsxd rax, dword [rsp + 0x2fc]
imul rax, rax, 0x28
mov rdx, qword [rsp + 0x290]
add rdx, rax
mov r8d, 8
lea rcx, [rsp + 0x328]
call fcn.14004c0a0
lea rcx, [rsp + 0x328]
call fcn.14004d590
test rax, rax
jbe 0x14002af44
lea rdx, [rsp + 0x328]
lea rcx, [rsp + 0x348]
call fcn.1400114a0
mov qword [rsp + 0x460], rax
mov rax, qword [rsp + 0x460]
mov qword [rsp + 0x468], rax
mov rcx, qword [rsp + 0x468]
call fcn.140011510
mov rdx, rax
lea rcx, [rsp + 0x300]
call fcn.140003450
nop
lea rcx, [rsp + 0x348]
call fcn.1400114e0
movsxd rcx, dword [rsp + 0x2fc]
imul rcx, rcx, 0x28
mov rax, qword [rsp + 0x290]
mov eax, dword [rax + rcx + 8]
mov dword [rsp + 0x314], eax
mov eax, dword [rsp + 0x314]
mov dword [rsp + 0x310], eax
cmp dword [rsp + 0x2c0], 0
je 0x14002afc4
movsxd rcx, dword [rsp + 0x2fc]
imul rcx, rcx, 0x28
mov rax, qword [rsp + 0x290]
mov ecx, dword [rax + rcx + 8]
mov eax, dword [rsp + 0x2c0]
lea eax, [rcx + rax - 1]
xor edx, edx
div dword [rsp + 0x2c0]
mov dword [rsp + 0x338], eax
mov eax, dword [rsp + 0x338]
imul eax, dword [rsp + 0x2c0]
mov dword [rsp + 0x310], eax
mov rax, qword [rsp + 0x490]
cmp dword [rax + 0xc], 0
je 0x14002afe4
mov rax, qword [rsp + 0x2f0]
mov qword [rsp + 0x308], rax
jmp 0x14002aff2
mov eax, dword [rsp + 0x28c]
mov dword [rsp + 0x308], eax
movsxd rcx, dword [rsp + 0x2fc]
imul rcx, rcx, 0x28
mov rax, qword [rsp + 0x290]
mov eax, dword [rax + rcx + 0xc]
mov dword [rsp + 0x318], eax
movsxd rcx, dword [rsp + 0x2fc]
imul rcx, rcx, 0x28
mov rax, qword [rsp + 0x290]
mov eax, dword [rax + rcx + 0x10]
mov dword [rsp + 0x31c], eax
movsxd rcx, dword [rsp + 0x2fc]
imul rcx, rcx, 0x28
mov rax, qword [rsp + 0x290]
mov eax, dword [rax + rcx + 0x14]
mov dword [rsp + 0x320], eax
movsxd rcx, dword [rsp + 0x2fc]
imul rcx, rcx, 0x28
mov rax, qword [rsp + 0x290]
mov eax, dword [rax + rcx + 0x24]
mov dword [rsp + 0x324], eax
mov rcx, qword [rsp + 0x490]
add rcx, 0xe0
lea rdx, [rsp + 0x300]
call fcn.140030bc0
nop
lea rcx, [rsp + 0x300]
call fcn.140030420
jmp 0x14002ae46
lea rcx, [rsp + 0x298]
call fcn.140030420
xor eax, eax
test eax, eax
jne 0x14002a889
cmp qword [rsp + 0x270], 0
je 0x14002b0cc
mov rcx, qword [rsp + 0x270]
call fcn.1400299e0
cmp qword [rsp + 0x48], 0
je 0x14002b0de
mov rcx, qword [rsp + 0x48]
call fcn.1400299e0
cmp qword [rsp + 0x40], 0
je 0x14002b0f0
mov rcx, qword [rsp + 0x40]
call fcn.1400299c0
mov rcx, qword [rsp + 0x490]
add rcx, 0xe0
call fcn.140030bb0
cmp rax, 2
jb 0x14002b115
mov dword [rsp + 0x278], 1
mov rcx, qword [rsp + 0x490]
add rcx, 0xe0
call fcn.140030bb0
mov eax, dword [rsp + 0x278]
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.14004c470
add rsp, 0x480
pop rdi
ret