Function at 0x180007fb0
Capabilities:
Check if file exists
Enumerate pe sections
Get common file path
Get file attributes
Get file size
Read file via mapping

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x1a0
mov rax, qword [0x18008cb00]
xor rax, rsp
mov qword [rsp + 0x170], rax
xor r14d, r14d
mov dword [rsp + 0x44], r9d
mov qword [rsp + 0x50], r8
mov r15, rdx
mov rbx, rcx
test rcx, rcx
je 0x1800083c9
test rdx, rdx
je 0x1800083c9
lea rcx, [rsp + 0x61]
xor edx, edx
mov r8d, 0x103
mov qword [rsp + 0x190], rdi
mov byte [rsp + 0x60], r14b
call fcn.18002a9c0
lea rcx, [rsp + 0x60]
mov r8d, 0x103
mov rdx, rbx
call fcn.18002b560
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x180008156
lea edx, [r14 + 0x5c]
mov rcx, rbx
call fcn.18002b90c
test rax, rax
jne 0x180008156
lea rcx, [rsp + 0x60]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1800080bf
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x60]
repne scasb al, byte [rdi]
lea rax, [rsp + 0x60]
not rcx
cmp byte [rcx + rax - 2], 0x5c
je 0x180008097
xor eax, eax
lea rdi, [rsp + 0x60]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x1800703d4]
mov word [rdi - 1], ax
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x60]
repne scasb al, byte [rdi]
xor ecx, ecx
nop word [rax + rax]
movzx eax, byte [rbx + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x1800080b0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x180008156
lea rcx, [rsp + 0x60]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x18000813f
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x60]
repne scasb al, byte [rdi]
lea rax, [rsp + 0x60]
not rcx
cmp byte [rcx + rax - 2], 0x5c
je 0x18000811b
xor eax, eax
lea rdi, [rsp + 0x60]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x1800703d4]
mov word [rdi - 1], ax
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x60]
repne scasb al, byte [rdi]
xor ecx, ecx
nop word [rax + rax]
movzx eax, byte [rbx + rcx]
inc rcx
mov byte [rdi + rcx - 2], al
test al, al
jne 0x180008130
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x180008156
xor eax, eax
jmp 0x18000824a
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x60]
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x198], rsi
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x18000819a
xor eax, eax
jmp 0x180008242
lea rdx, [rsp + 0x40]
mov rcx, rax
mov qword [rsp + 0x1c8], rbp
mov dword [rsp + 0x40], r14d
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r9d, dword [rsp + 0x40]
mov edi, eax
mov rax, qword [str.TODETOURS_FRAME_PE_Mapping]
xor edx, edx
mov qword [rsp + 0x28], rax
lea r8d, [rdx + 2]
mov rcx, rsi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rbp, rax
test rax, rax
je 0x1800082c0
xor r9d, r9d
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
je 0x1800082b7
mov r9d, dword [rax + 0x3c]
add r9, rax
mov eax, dword [0x18008c16c]
cmp dword [r9], eax
je 0x18000826f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rbp, qword [rsp + 0x1c8]
mov rsi, qword [rsp + 0x198]
mov rdi, qword [rsp + 0x190]
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.18002a990
add rsp, 0x1a0
pop r15
pop r14
pop rbx
ret
movzx r11d, word [r9 + 6]
lea r8, [r9 + 0xf8]
mov edi, r14d
test r11d, r11d
je 0x1800082ae
mov r10d, dword [r9 + 0x78]
mov ecx, dword [r8 + 0xc]
cmp r10d, ecx
jb 0x1800082a3
mov eax, dword [r8 + 8]
lea edx, [rcx + rax]
mov eax, dword [r9 + 0x7c]
lea ecx, [r10 + rax]
cmp ecx, edx
jbe 0x1800082c8
inc edi
add r8, 0x28
cmp edi, r11d
jb 0x180008287
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
jmp 0x180008232
mov edi, dword [r8 + 0x14]
mov edx, dword [r8 + 0xc]
mov qword [rsp + 0x180], r13
mov ecx, edi
mov r9d, r14d
sub ecx, edx
add ecx, r10d
add rcx, rbx
mov eax, dword [rcx + 0x1c]
mov r10d, dword [rcx + 0x20]
mov r13d, dword [rcx + 0x18]
sub eax, edx
sub r10d, edx
add eax, edi
add r10d, edi
add eax, ebx
add r10d, ebx
mov qword [rsp + 0x58], rax
mov eax, dword [rcx + 0x24]
sub eax, edx
add eax, edi
add eax, ebx
mov qword [rsp + 0x48], rax
test r13d, r13d
je 0x18000839e
mov qword [rsp + 0x188], r12
mov r11d, edx
mov r12d, edi
nop dword [rax]
mov ecx, r12d
mov rdi, r15
sub ecx, r11d
add ecx, ebx
add ecx, dword [r10]
sub rdi, rcx
movzx edx, byte [rcx]
movzx eax, byte [rcx + rdi]
sub edx, eax
jne 0x180008353
inc rcx
test eax, eax
jne 0x180008341
test edx, edx
je 0x180008365
inc r9d
add r10, 4
cmp r9d, r13d
jb 0x180008330
jmp 0x180008396
mov rdx, qword [rsp + 0x48]
movsxd r8, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x50]
mov eax, r9d
movzx edx, word [rdx + rax*2]
mov rax, qword [rsp + 0x58]
mov edx, dword [rax + rdx*4]
sub edx, r11d
add edx, r12d
add edx, ebx
call fcn.18002aac0
mov r14d, 1
mov r12, qword [rsp + 0x188]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x180]
mov eax, r14d
jmp 0x18000823a
xor eax, eax
jmp 0x180008252