Function at 0x180001000
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 [0x180028100]
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 0x180001419
test rdx, rdx
je 0x180001419
lea rcx, [rsp + 0x61]
xor edx, edx
mov r8d, 0x103
mov qword [rsp + 0x190], rdi
mov byte [rsp + 0x60], r14b
call fcn.1800067a0
lea rcx, [rsp + 0x60]
mov r8d, 0x103
mov rdx, rbx
call fcn.1800065f0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1800011a6
lea edx, [r14 + 0x5c]
mov rcx, rbx
call fcn.1800065bc
test rax, rax
jne 0x1800011a6
lea rcx, [rsp + 0x60]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x18000110f
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 0x1800010e7
xor eax, eax
lea rdi, [rsp + 0x60]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x18002050c]
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 0x180001100
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1800011a6
lea rcx, [rsp + 0x60]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x18000118f
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 0x18000116b
xor eax, eax
lea rdi, [rsp + 0x60]
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
movzx eax, word [0x18002050c]
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 0x180001180
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1800011a6
xor eax, eax
jmp 0x18000129a
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 0x1800011ea
xor eax, eax
jmp 0x180001292
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 0x180001310
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 0x180001307
mov r9d, dword [rax + 0x3c]
add r9, rax
mov eax, dword [section..data]
cmp dword [r9], eax
je 0x1800012bf
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.180006770
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 0x1800012fe
mov r10d, dword [r9 + 0x78]
mov ecx, dword [r8 + 0xc]
cmp r10d, ecx
jb 0x1800012f3
mov eax, dword [r8 + 8]
lea edx, [rcx + rax]
mov eax, dword [r9 + 0x7c]
lea ecx, [r10 + rax]
cmp ecx, edx
jbe 0x180001318
inc edi
add r8, 0x28
cmp edi, r11d
jb 0x1800012d7
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
jmp 0x180001282
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 0x1800013ee
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 0x1800013a3
inc rcx
test eax, eax
jne 0x180001391
test edx, edx
je 0x1800013b5
inc r9d
add r10, 4
cmp r9d, r13d
jb 0x180001380
jmp 0x1800013e6
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.1800068a0
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 0x18000128a
xor eax, eax
jmp 0x1800012a2