Function at 0x180034e50
Capabilities:
Get file size
Read file via mapping
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x10], rdx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov r15d, r8d
mov r12, rdx
xor r13d, r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r13 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
je 0x18003515a
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
mov dword [rsp + 0xb8], eax
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor edx, edx
lea r8d, [r13 + 2]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rsi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x180035132
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
lea edx, [r13 + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x180035132
mov byte [rsp + 0x20], 1
mov r9, rax
xor r8d, r8d
mov rdx, rbx
call fcn.180007830
test al, al
je 0x18003504a
movsxd r8, dword [rdi + 0x3c]
add r8, rdi
movzx eax, word [r8 + 0x18]
mov ecx, 0x10b
cmp ax, cx
jne 0x180034f4e
mov eax, r13d
jmp 0x180034f61
mov ecx, 0x20b
cmp ax, cx
jne 0x18003504a
mov eax, 1
movzx ecx, word [r8 + 6]
test eax, eax
jne 0x180035060
cmp r15d, ecx
ja 0x18003504a
movzx eax, word [r8 + 0x14]
lea r13d, [r15 + r15*4]
shl r13d, 3
add rax, r8
add r13, rax
mov rcx, r12
call fcn.1800069b0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x18003504a
mov edx, dword [r13 + 0x2c]
add rdx, rdi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, dword [r13 + 0x28]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call fcn.18000d5c0
mov r9, rdi
mov r8, rsi
mov edx, r14d
mov rcx, rbx
call fcn.18000dc30
mov al, 1
jmp 0x18003515c
mov r9, rdi
mov r8, rsi
mov edx, r14d
mov rcx, rbx
call fcn.18000dc30
jmp 0x18003515a
cmp r15d, ecx
ja 0x18003504a
movzx eax, word [r8 + 0x14]
lea r13d, [r15 + r15*4]
shl r13d, 3
add rax, r8
add r13, rax
mov rcx, r12
call fcn.1800069b0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x18003504a
mov edx, dword [r13 + 0x2c]
add rdx, rdi
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, dword [r13 + 0x28]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call fcn.18000d5c0
mov r9, rdi
mov r8, rsi
mov edx, r14d
mov rcx, rbx
call fcn.18000dc30
mov al, 1
jmp 0x18003515c
lea rdx, [rsp + 0xb8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x18003515a
test byte [rsp + 0xb8], 2
jne 0x18003515a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret