Function at 0x14002ae00
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 0x14002ae78
xor eax, eax
jmp 0x14002b760
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, 0xe8
call fcn.140031270
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 0x14002af03
jmp 0x14002b6e4
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 0x14002af5c
jmp 0x14002b6e4
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 0x14002af94
jmp 0x14002b6e4
cmp qword [rsp + 0x48], 0
je 0x14002afaf
mov rcx, qword [rsp + 0x48]
call fcn.14002a010
mov qword [rsp + 0x48], 0
cmp qword [rsp + 0x270], 0
je 0x14002afd3
mov rcx, qword [rsp + 0x270]
call fcn.14002a010
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 0x14002b06f
mov rax, qword [rsp + 0x280]
cmp dword [rax], 0x4550
je 0x14002b074
jmp 0x14002b6e4
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 0x16]
and eax, 0x2000
test eax, eax
je 0x14002b096
mov dword [rsp + 0x458], 1
jmp 0x14002b0a1
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 0x14002b0d7
mov rax, qword [rsp + 0x490]
mov dword [rax + 0xc], 0
jmp 0x14002b109
mov rax, qword [rsp + 0x280]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x14002b109
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 0x14002b1c9
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 0x14002b223
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, [0x14007d480]
call fcn.14004d378
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 0x14002b27c
jmp 0x14002b6e4
mov r8d, dword [rsp + 0x2e8]
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x490]
mov rcx, qword [rcx + 0x68]
call fcn.14004c600
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 0x14002b2e5
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 0x14002b30c
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 0x14002b389
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 0x14002b3a9
mov rax, qword [rsp + 0x2f0]
mov qword [rsp + 0x2a0], rax
jmp 0x14002b3b7
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, 0xe8
lea rdx, [rsp + 0x298]
call fcn.1400311f0
mov qword [rsp + 0x290], 0
mov rax, qword [rsp + 0x490]
cmp dword [rax + 0xc], 0
je 0x14002b448
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 0x14002b469
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 0x14002b487
mov eax, dword [rsp + 0x2fc]
add eax, 1
mov dword [rsp + 0x2fc], eax
mov eax, dword [rsp + 0x2d0]
cmp dword [rsp + 0x2fc], eax
jge 0x14002b6cd
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.14004dca0
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.14004c600
lea rcx, [rsp + 0x328]
call fcn.14004dae0
test rax, rax
jbe 0x14002b574
lea rdx, [rsp + 0x328]
lea rcx, [rsp + 0x348]
call fcn.140011140
mov qword [rsp + 0x460], rax
mov rax, qword [rsp + 0x460]
mov qword [rsp + 0x468], rax
mov rcx, qword [rsp + 0x468]
call fcn.140011190
mov rdx, rax
lea rcx, [rsp + 0x300]
call fcn.140003450
nop
lea rcx, [rsp + 0x348]
call fcn.140031b50
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 0x14002b5f4
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 0x14002b614
mov rax, qword [rsp + 0x2f0]
mov qword [rsp + 0x308], rax
jmp 0x14002b622
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, 0xe8
lea rdx, [rsp + 0x300]
call fcn.1400311f0
nop
lea rcx, [rsp + 0x300]
call fcn.140030a60
jmp 0x14002b476
lea rcx, [rsp + 0x298]
call fcn.140030a60
xor eax, eax
test eax, eax
jne 0x14002aeb9
cmp qword [rsp + 0x270], 0
je 0x14002b6fc
mov rcx, qword [rsp + 0x270]
call fcn.14002a010
cmp qword [rsp + 0x48], 0
je 0x14002b70e
mov rcx, qword [rsp + 0x48]
call fcn.14002a010
cmp qword [rsp + 0x40], 0
je 0x14002b720
mov rcx, qword [rsp + 0x40]
call fcn.140029ff0
mov rcx, qword [rsp + 0x490]
add rcx, 0xe8
call fcn.1400311e0
cmp rax, 2
jb 0x14002b745
mov dword [rsp + 0x278], 1
mov rcx, qword [rsp + 0x490]
add rcx, 0xe8
call fcn.1400311e0
mov eax, dword [rsp + 0x278]
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.14004c9d0
add rsp, 0x480
pop rdi
ret