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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2c0
mov qword [rsp + 0x88], 0xfffffffffffffffe
mov qword [rsp + 0x310], rbx
mov rax, qword [0x1800ff050]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
mov r14, rdx
mov rbp, rcx
xor ebx, ebx
lea r12d, [rbx + 1]
mov r15d, 0x80000000
nop dword [rax + rax]
mov word [rsp + 0xa0], bx
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0xa2]
call fcn.18006cf60
lea rdx, [rbp + 0xc0]
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov word [rsp + 0x90], bx
xor eax, eax
mov qword [rsp + 0x92], rax
mov r8d, r12d
lea rdx, str..v_02d
lea rcx, [rsp + 0x90]
call fcn.180016d80
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov edx, 0xc0000000
cmp dword [rbp + 0x24], 0
cmovne edx, r15d
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x20000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1800148a6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x180014998
cmp dword [rbp + 0x24], 0
jne 0x180014983
cmp eax, 5
je 0x180014869
cmp eax, 0x20
je 0x180014869
cmp eax, 0xa7
je 0x180014869
cmp eax, 0x21
je 0x180014869
cmp eax, 0x13
jne 0x180014983
mov dword [rbp + 0x24], 1
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
mov edx, r15d
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180014979
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rbx
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180014d92
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
jne 0x180014d82
mov qword [rsp + 0x58], rcx
lea rcx, [rbp + 0x90]
lea rdx, [rsp + 0x50]
call fcn.18001d8d0
cmp dword [rbp + 0x24], 0
jne 0x18001496b
mov qword [rsp + 0x80], 7
mov qword [rsp + 0x78], rbx
mov word [rsp + 0x68], bx
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rsp + 0xa0]
lea rcx, [rsp + 0x60]
call fcn.1800027f0
nop
lea rcx, [rbp + 0x2c8]
lea rdx, [rsp + 0x60]
call fcn.180016400
nop
cmp qword [rsp + 0x80], 8
jb 0x18001496b
mov rcx, qword [rsp + 0x68]
call fcn.18006a4d4
inc r12d
cmp r12d, 0x40
jg 0x180014998
jmp 0x180014780
call fcn.180003180
jmp 0x180014da4
test eax, eax
jle 0x180014da4
movzx eax, ax
or eax, 0x80070000
jmp 0x180014da4
lea rcx, [rbp + 0x90]
call fcn.180016260
mov r15, rax
mov rdi, qword [rax + 8]
sub rdi, 0x200
mov qword [rsp + 0x48], rdi
xor edx, edx
mov r8d, 0x200
mov rcx, r14
call fcn.18006cf60
mov r12, qword [r15]
lea rsi, [rbp + 0x10]
cmp r12, 0xffffffffffffffff
je 0x180014d7b
test r14, r14
je 0x180014d7b
mov rax, rdi
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x180014a1e
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x200
mov r9, r14
lea r8, [rsp + 0x48]
mov rdx, r12
mov rcx, rsi
call fcn.180003e10
jmp 0x180014ad8
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180014a3e
call fcn.180003180
jmp 0x180014ad8
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x200
mov rdx, r14
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180014ae9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x180014a88
cmp eax, 0x3e6
je 0x180014a88
test eax, eax
jle 0x180014ad8
movzx eax, ax
or eax, 0x80070000
jmp 0x180014ad8
mov edx, 0x200
mov rcx, rsi
call fcn.180003da0
test eax, eax
js 0x180014ad8
cmp eax, 1
je 0x180014ad8
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x200
mov rdx, qword [rsi]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180014ac5
call fcn.180003180
jmp 0x180014ad8
mov r8d, 0x200
mov rdx, qword [rsi]
mov rcx, r14
call fcn.18006c2d0
jmp 0x180014ae9
test eax, eax
js 0x180014da4
cmp eax, 1
je 0x180014da4
mov rdx, r14
mov rcx, rbp
call fcn.180014060
test eax, eax
je 0x180014aff
xor eax, eax
jmp 0x180014da4
xor edx, edx
mov r8d, 0x200
mov rcx, r14
call fcn.18006cf60
mov rdi, qword [rbp + 0xa8]
cmp rdi, qword [rbp + 0xb0]
jbe 0x180014b24
call fcn.18006aa4c
mov r11, qword [rbp + 0x90]
test r11, r11
jne 0x180014b3a
call fcn.18006aa4c
mov r11, rbx
jmp 0x180014b3d
mov r11, qword [r11]
cmp rdi, qword [r11 + 0x20]
jb 0x180014b48
call fcn.18006aa4c
mov rdi, qword [rdi]
cmp rdi, 0xffffffffffffffff
je 0x180014d74
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180014b75
call fcn.180003180
jmp 0x180014c0f
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x200
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180014c20
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x180014bbf
cmp eax, 0x3e6
je 0x180014bbf
test eax, eax
jle 0x180014c0f
movzx eax, ax
or eax, 0x80070000
jmp 0x180014c0f
mov edx, 0x200
mov rcx, rsi
call fcn.180003da0
test eax, eax
js 0x180014c0f
cmp eax, 1
je 0x180014c0f
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x200
mov rdx, qword [rsi]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180014bfc
call fcn.180003180
jmp 0x180014c0f
mov r8d, 0x200
mov rdx, qword [rsi]
mov rcx, r14
call fcn.18006c2d0
jmp 0x180014c20
test eax, eax
js 0x180014da4
cmp eax, 1
je 0x180014da4
mov rdx, r14
mov rcx, rbp
call fcn.180014060
test eax, eax
jne 0x180014c39
mov eax, 0xe0035003
jmp 0x180014da4
cmp dword [rbp + 0x24], 0
je 0x180014c46
xor eax, eax
jmp 0x180014da4
mov rdi, qword [r15 + 8]
dec rdi
and rdi, 0xfffffffffffffe00
mov qword [rsp + 0x48], rdi
mov rbp, qword [r15]
cmp rbp, 0xffffffffffffffff
je 0x180014d6d
mov rax, rdi
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x180014ca3
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x200
mov r9, r14
lea r8, [rsp + 0x48]
mov rdx, rbp
mov rcx, rsi
call fcn.180003f70
jmp 0x180014d55
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180014cc3
call fcn.180003180
jmp 0x180014d55
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x200
mov rdx, r14
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180014d5e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x180014d09
cmp eax, 0x3e6
je 0x180014d09
test eax, eax
jle 0x180014d55
movzx eax, ax
or eax, 0x80070000
jmp 0x180014d55
mov edx, 0x200
mov rcx, rsi
call fcn.180003da0
test eax, eax
js 0x180014d55
cmp eax, 1
je 0x180014d55
mov r8d, 0x200
mov rdx, r14
mov rcx, qword [rsi]
call fcn.18006c2d0
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x200
mov rdx, qword [rsi]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180014d5e
call fcn.180003180
test eax, eax
js 0x180014da4
cmp eax, 1
je 0x180014da4
add rdi, 0x200
mov qword [r15 + 8], rdi
xor eax, eax
jmp 0x180014da4
mov eax, 0x80070057
jmp 0x180014da4
mov eax, 0x80070057
jmp 0x180014da4
mov eax, 0x80070057
jmp 0x180014da4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0035003
jmp 0x180014da4
call fcn.180003180
mov edi, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.18006a4f0
mov rbx, qword [rsp + 0x310]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret