Function at 0x1400161c0
Capabilities:
Read file via mapping

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
lea rsi, [rcx + 0x10]
mov rdi, rcx
mov rcx, qword [rsi]
xor r12d, r12d
movzx r15d, r8b
mov rbp, rdx
test rcx, rcx
je 0x1400161fa
jle 0x1400161f7
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rsi], r12
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14001620f
jle 0x14001620b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 8], r12
mov rcx, qword [rdi]
test rcx, rcx
je 0x140016222
jle 0x14001621f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], r12
mov rcx, qword [rdi + 0x48]
test rcx, rcx
je 0x140016237
jle 0x140016233
call qword [sym.imp.KERNEL32.dll_ReleaseActCtx]
mov qword [rdi + 0x48], r12
lea r14, [rdi + 0xf8]
mov qword [rdi + 0x20], r12
mov qword [rdi + 0x28], r12
cmp r14, rbp
je 0x140016275
mov rcx, r14
call fcn.1400035e0
mov rcx, rbp
call fcn.1400035e0
mov rbx, qword [rbp + 0x10]
mov rcx, rbp
call fcn.140004700
mov r8, rbx
mov rdx, rax
mov rcx, r14
call fcn.140004bc0
mov rcx, rbp
mov byte [rdi + 0x1c], r12b
call fcn.140003d90
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov rcx, rax
mov dword [rsp + 0x28], r12d
mov edx, 0x120089
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, qword [rdi]
mov rbx, rax
cmp rax, rcx
je 0x1400162c4
test rcx, rcx
jle 0x1400162be
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], rbx
mov rcx, rbx
test rcx, rcx
jle 0x1400163fe
mov qword [rsp + 0x28], r12
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], r12d
mov r8d, 0x1000002
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rcx, qword [rdi + 8]
mov rbx, rax
cmp rax, rcx
je 0x140016306
test rcx, rcx
jle 0x1400162ff
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 8], rbx
mov rcx, rbx
xor r9d, r9d
test rcx, rcx
jle 0x14001635a
xor r8d, r8d
mov byte [rdi + 0x18], r12b
lea edx, [r9 + 4]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
lea rax, [rsp + 0x70]
cmp rax, rsi
je 0x140016350
mov rcx, qword [rsi]
cmp rbx, rcx
je 0x1400163d1
test rcx, rcx
jle 0x140016348
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rsi], rbx
jmp 0x1400163d1
test rbx, rbx
jle 0x1400163d1
mov rcx, rbx
jmp 0x1400163cb
mov rcx, qword [rdi]
xor edx, edx
mov qword [rsp + 0x28], r12
mov byte [rdi + 0x18], 1
mov dword [rsp + 0x20], r12d
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rcx, qword [rdi + 8]
mov rbx, rax
cmp rax, rcx
je 0x140016395
test rcx, rcx
jle 0x14001638e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 8], rbx
mov rcx, rbx
test rcx, rcx
jle 0x1400163d1
xor r9d, r9d
mov qword [rsp + 0x20], r12
xor r8d, r8d
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
lea rdx, [rsp + 0x70]
mov rcx, rsi
mov qword [rsp + 0x70], rax
call fcn.140017590
mov rcx, qword [rsp + 0x70]
test rcx, rcx
jle 0x1400163d1
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp qword [rsi], r12
je 0x1400163fe
xor edx, edx
mov rcx, rdi
call fcn.140016520
test eax, eax
js 0x14001640d
test r15b, r15b
jne 0x14001640d
mov rcx, r14
call fcn.140003d90
mov rdx, rax
mov rcx, rdi
call fcn.1400170a0
jmp 0x14001640d
mov rax, qword gs:[0x30]
mov eax, dword [rax + 0x1250]
mov rbx, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret