Function at 0x180072780
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 [0x18010f050]
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.1800795c0
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.180074470
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 0x1800728f6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1800729e8
cmp dword [rbp + 0x24], 0
jne 0x1800729d3
cmp eax, 5
je 0x1800728b9
cmp eax, 0x20
je 0x1800728b9
cmp eax, 0xa7
je 0x1800728b9
cmp eax, 0x21
je 0x1800728b9
cmp eax, 0x13
jne 0x1800729d3
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 0x1800729c9
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 0x180072de2
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
jne 0x180072dd2
mov qword [rsp + 0x58], rcx
lea rcx, [rbp + 0x90]
lea rdx, [rsp + 0x50]
call fcn.180063f30
cmp dword [rbp + 0x24], 0
jne 0x1800729bb
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.180002890
nop
lea rcx, [rbp + 0x2c8]
lea rdx, [rsp + 0x60]
call fcn.18001cf60
nop
cmp qword [rsp + 0x80], 8
jb 0x1800729bb
mov rcx, qword [rsp + 0x68]
call fcn.180076a50
inc r12d
cmp r12d, 0x40
jg 0x1800729e8
jmp 0x1800727d0
call fcn.180003220
jmp 0x180072df4
test eax, eax
jle 0x180072df4
movzx eax, ax
or eax, 0x80070000
jmp 0x180072df4
lea rcx, [rbp + 0x90]
call fcn.1800742f0
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.1800795c0
mov r12, qword [r15]
lea rsi, [rbp + 0x10]
cmp r12, 0xffffffffffffffff
je 0x180072dcb
test r14, r14
je 0x180072dcb
mov rax, rdi
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x180072a6e
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.180003e70
jmp 0x180072b28
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180072a8e
call fcn.180003220
jmp 0x180072b28
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 0x180072b39
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x180072ad8
cmp eax, 0x3e6
je 0x180072ad8
test eax, eax
jle 0x180072b28
movzx eax, ax
or eax, 0x80070000
jmp 0x180072b28
mov edx, 0x200
mov rcx, rsi
call fcn.180003e00
test eax, eax
js 0x180072b28
cmp eax, 1
je 0x180072b28
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 0x180072b15
call fcn.180003220
jmp 0x180072b28
mov r8d, 0x200
mov rdx, qword [rsi]
mov rcx, r14
call fcn.1800785c0
jmp 0x180072b39
test eax, eax
js 0x180072df4
cmp eax, 1
je 0x180072df4
mov rdx, r14
mov rcx, rbp
call fcn.1800720b0
test eax, eax
je 0x180072b4f
xor eax, eax
jmp 0x180072df4
xor edx, edx
mov r8d, 0x200
mov rcx, r14
call fcn.1800795c0
mov rdi, qword [rbp + 0xa8]
cmp rdi, qword [rbp + 0xb0]
jbe 0x180072b74
call fcn.180076fcc
mov r11, qword [rbp + 0x90]
test r11, r11
jne 0x180072b8a
call fcn.180076fcc
mov r11, rbx
jmp 0x180072b8d
mov r11, qword [r11]
cmp rdi, qword [r11 + 0x20]
jb 0x180072b98
call fcn.180076fcc
mov rdi, qword [rdi]
cmp rdi, 0xffffffffffffffff
je 0x180072dc4
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180072bc5
call fcn.180003220
jmp 0x180072c5f
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 0x180072c70
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x180072c0f
cmp eax, 0x3e6
je 0x180072c0f
test eax, eax
jle 0x180072c5f
movzx eax, ax
or eax, 0x80070000
jmp 0x180072c5f
mov edx, 0x200
mov rcx, rsi
call fcn.180003e00
test eax, eax
js 0x180072c5f
cmp eax, 1
je 0x180072c5f
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 0x180072c4c
call fcn.180003220
jmp 0x180072c5f
mov r8d, 0x200
mov rdx, qword [rsi]
mov rcx, r14
call fcn.1800785c0
jmp 0x180072c70
test eax, eax
js 0x180072df4
cmp eax, 1
je 0x180072df4
mov rdx, r14
mov rcx, rbp
call fcn.1800720b0
test eax, eax
jne 0x180072c89
mov eax, 0xe0035003
jmp 0x180072df4
cmp dword [rbp + 0x24], 0
je 0x180072c96
xor eax, eax
jmp 0x180072df4
mov rdi, qword [r15 + 8]
dec rdi
and rdi, 0xfffffffffffffe00
mov qword [rsp + 0x48], rdi
mov rbp, qword [r15]
cmp rbp, 0xffffffffffffffff
je 0x180072dbd
mov rax, rdi
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x180072cf3
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.180003fd0
jmp 0x180072da5
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180072d13
call fcn.180003220
jmp 0x180072da5
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 0x180072dae
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x180072d59
cmp eax, 0x3e6
je 0x180072d59
test eax, eax
jle 0x180072da5
movzx eax, ax
or eax, 0x80070000
jmp 0x180072da5
mov edx, 0x200
mov rcx, rsi
call fcn.180003e00
test eax, eax
js 0x180072da5
cmp eax, 1
je 0x180072da5
mov r8d, 0x200
mov rdx, r14
mov rcx, qword [rsi]
call fcn.1800785c0
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 0x180072dae
call fcn.180003220
test eax, eax
js 0x180072df4
cmp eax, 1
je 0x180072df4
add rdi, 0x200
mov qword [r15 + 8], rdi
xor eax, eax
jmp 0x180072df4
mov eax, 0x80070057
jmp 0x180072df4
mov eax, 0x80070057
jmp 0x180072df4
mov eax, 0x80070057
jmp 0x180072df4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0035003
jmp 0x180072df4
call fcn.180003220
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.180076a70
mov rbx, qword [rsp + 0x310]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret