Function at 0x180031f10
Capabilities:
Check if file exists
Get file size
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xf0
mov qword [rbp - 0x29], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x1801485f0]
xor rax, rsp
mov qword [rbp + 0x3f], rax
lea rcx, [rbp + 0x1f]
call fcn.18000c010
nop
xor r15d, r15d
cmp qword [rbp + 0x2f], r15
je 0x180032318
lea rcx, [rbp + 0x1f]
cmp qword [rbp + 0x37], 8
cmovae rcx, qword [rbp + 0x1f]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x180032318
lea rcx, [rbp - 0x21]
call fcn.180031430
mov rdi, rax
lea rcx, [rbp - 1]
call fcn.180031320
mov rbx, rax
lea r8d, [r15 + 1]
lea rdx, [0x180100a48]
lea rcx, [rbp + 0x1f]
call fcn.180016430
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
mov rcx, rax
call fcn.1800162f0
lea r8d, [r15 + 1]
lea rdx, [0x180100a48]
mov rcx, rax
call fcn.180016430
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rdi
mov rcx, rax
call fcn.1800162f0
nop
cmp qword [rbp + 0x17], 8
jb 0x180031fed
mov rcx, qword [rbp - 1]
call fcn.1800b5700
mov qword [rbp + 0x17], 7
mov qword [rbp + 0xf], r15
mov word [rbp - 1], r15w
cmp qword [rbp - 9], 8
jb 0x18003200e
mov rcx, qword [rbp - 0x21]
call fcn.1800b5700
mov qword [rbp - 9], 7
mov qword [rbp - 0x11], r15
mov word [rbp - 0x21], r15w
mov qword [rbp - 0x49], r15
mov qword [rbp - 0x41], r15
mov qword [rbp - 0x39], r15
xor r9d, r9d
mov r8b, 1
lea rdx, [rbp - 0x49]
lea rcx, [rbp + 0x1f]
call fcn.180027590
mov rdi, qword [rbp - 0x49]
cmp rdi, qword [rbp - 0x41]
je 0x1800322c6
nop dword [rax]
mov qword [rbp - 0x69], r15
mov qword [rbp - 0x61], r15
mov qword [rbp - 0x59], r15
mov r9b, 1
xor r8d, r8d
lea rdx, [rbp - 0x69]
mov rcx, rdi
call fcn.180027590
mov rbx, qword [rbp - 0x69]
cmp rbx, qword [rbp - 0x61]
jne 0x1800320bf
mov rbx, qword [rbp - 0x69]
test rbx, rbx
je 0x1800322b8
mov rsi, qword [rbp - 0x61]
cmp rbx, rsi
je 0x1800322a4
cmp qword [rbx + 0x18], 8
jb 0x1800320a1
mov rcx, qword [rbx]
call fcn.1800b5700
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
add rbx, 0x20
cmp rbx, rsi
jne 0x180032092
jmp 0x1800322a0
lea rcx, [rbp - 1]
call fcn.180030ce0
nop
cmp rbx, qword [rbp - 0x61]
je 0x180032245
nop word [rax + rax]
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 9], 7
mov qword [rbp - 0x11], r15
mov word [rbp - 0x21], r15w
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x21]
call fcn.1800165a0
nop
lea rdx, [rbp - 1]
cmp qword [rbp + 0x17], 8
cmovae rdx, qword [rbp - 1]
mov r9, qword [rbp + 0xf]
xor r8d, r8d
lea rcx, [rbp - 0x21]
call fcn.180016dd0
cmp rax, 0xffffffffffffffff
jne 0x180032216
cmp qword [rbp - 0x11], 0
je 0x180032216
lea rcx, [rbp - 0x21]
cmp qword [rbp - 9], 8
cmovae rcx, qword [rbp - 0x21]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180032216
mov dword [rbp - 0x51], r15d
lea rdx, [rbp - 0x51]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
cmp dword [rbp - 0x51], 0
jne 0x18003220c
mov rcx, rsi
test eax, eax
je 0x18003220f
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14d, r14d
je 0x180032216
cmp qword [rbp - 0x11], 0
je 0x180032216
lea rcx, [rbp - 0x21]
cmp qword [rbp - 9], 8
cmovae rcx, qword [rbp - 0x21]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180032216
mov dword [rbp - 0x31], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x31]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rbp - 9], 8
jb 0x180032226
mov rcx, qword [rbp - 0x21]
call fcn.1800b5700
mov qword [rbp - 9], 7
mov qword [rbp - 0x11], r15
mov word [rbp - 0x21], r15w
add rbx, 0x20
cmp rbx, qword [rbp - 0x61]
jne 0x1800320e0
cmp qword [rbp + 0x17], 8
jb 0x180032255
mov rcx, qword [rbp - 1]
call fcn.1800b5700
mov qword [rbp + 0x17], 7
mov qword [rbp + 0xf], r15
mov word [rbp - 1], r15w
mov rbx, qword [rbp - 0x69]
test rbx, rbx
je 0x1800322b8
mov rsi, qword [rbp - 0x61]
cmp rbx, rsi
je 0x1800322a4
cmp qword [rbx + 0x18], 8
jb 0x180032287
mov rcx, qword [rbx]
call fcn.1800b5700
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
add rbx, 0x20
cmp rbx, rsi
jne 0x180032278
mov rbx, qword [rbp - 0x69]
mov rcx, rbx
call fcn.1800b5700
mov qword [rbp - 0x59], r15
mov qword [rbp - 0x61], r15
mov qword [rbp - 0x69], r15
add rdi, 0x20
cmp rdi, qword [rbp - 0x41]
jne 0x180032050
mov rbx, qword [rbp - 0x49]
test rbx, rbx
je 0x180032318
mov rdi, qword [rbp - 0x41]
cmp rbx, rdi
je 0x180032304
cmp qword [rbx + 0x18], 8
jb 0x1800322e7
mov rcx, qword [rbx]
call fcn.1800b5700
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
add rbx, 0x20
cmp rbx, rdi
jne 0x1800322d8
mov rbx, qword [rbp - 0x49]
mov rcx, rbx
call fcn.1800b5700
mov qword [rbp - 0x49], r15
mov qword [rbp - 0x41], r15
mov qword [rbp - 0x39], r15
cmp qword [rbp + 0x37], 8
jb 0x180032328
mov rcx, qword [rbp + 0x1f]
call fcn.1800b5700
mov qword [rbp + 0x37], 7
mov qword [rbp + 0x2f], r15
mov word [rbp + 0x1f], r15w
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.1800b6c40
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret