Function at 0x140004420
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov rax, r9
mov r13, rdx
mov rbx, 0xffffffffffffffff
mov qword [rsp + 0x78], rbx
xor r15d, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, rbx
je 0x140004492
mov rbx, rax
mov qword [rsp + 0x78], rax
test rax, rax
je 0x140004492
mov al, 1
jmp 0x140004494
xor al, al
test al, al
je 0x14000474e
movabs rax, 0x535a2f2f46554f42
cmp qword [r13], rax
jne 0x140004830
movabs rax, 0x544349442f2f4454
cmp qword [r13 + 8], rax
jne 0x140004830
lea rcx, [r13 + 0x10]
call fcn.140004850
mov r12, rax
movabs rax, 0x7fffffffe
cmp r12, rax
ja 0x140004817
xorps xmm0, xmm0
movdqu xmmword [rsp + 0xa0], xmm0
mov rsi, r15
mov qword [rsp + 0xb0], r15
test r12, r12
je 0x14000451c
lea r8, [rsp + 0x40]
mov rdx, r12
lea rcx, [rsp + 0xa0]
call fcn.1400015f0
mov rsi, qword [rsp + 0xb0]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
je 0x14000476a
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x88], xmm0
mov r14, r15
mov qword [rsp + 0x98], r15
mov rdx, rdi
test eax, eax
je 0x14000456a
lea r8, [rsp + 0x40]
lea rcx, [rsp + 0x88]
call fcn.1400015f0
mov r14, qword [rsp + 0x98]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x50]
mov r8d, edi
mov r15, qword [rsp + 0x88]
mov rdx, r15
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140004786
cmp dword [rsp + 0x50], edi
jne 0x1400047a1
mov rcx, qword [rsp + 0x90]
sub rcx, r15
mov r8, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0xa0]
sub r8, rdi
mov rax, qword [rsp + 0x110]
add rax, 0xffffffffffffffe8
lea r9, [r13 + 0x18]
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, qword [rsp + 0x100]
call fcn.14002dea0
cmp rax, r12
jne 0x1400047fd
mov rcx, rax
call fcn.14002d3d0
test eax, eax
jne 0x1400047fd
test rbx, rbx
je 0x14000461e
cmp rbx, 0xffffffffffffffff
je 0x140004617
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rsp + 0x118]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, rbx
je 0x140004673
lea rcx, [rbx - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14000466b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, r13
mov qword [rsp + 0x78], rbx
lea rax, [rbx + 1]
test rax, 0xfffffffffffffffe
je 0x1400047ba
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x5c]
mov r8d, r12d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400047e2
mov eax, dword [rsp + 0x5c]
cmp rax, r12
jne 0x1400047e2
test r15, r15
je 0x1400046ee
sub r14, r15
mov rax, r15
cmp r14, 0x1000
jb 0x1400046e2
add r14, 0x27
mov r15, qword [r15 - 8]
sub rax, r15
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047d6
mov rdx, r14
mov rcx, r15
call fcn.140088f04
nop
test rdi, rdi
je 0x140004727
sub rsi, rdi
mov rax, rdi
cmp rsi, 0x1000
jb 0x14000471b
add rsi, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400047dc
mov rdx, rsi
mov rcx, rdi
call fcn.140088f04
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x14000473b
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x44], eax
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x44]
call fcn.14008a198
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x48], eax
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x48]
call fcn.14008a198
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x4c]
call fcn.14008a198
mov dword [rsp + 0x54], 0xffffffff
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x54]
call fcn.14008a198
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x58], eax
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x58]
call fcn.14008a198
nop
call fcn.14008fc64
nop
call fcn.14008fc64
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x60], eax
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x60]
call fcn.14008a198
mov dword [rsp + 0x64], 0xfffffff7
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x64]
call fcn.14008a198
nop
mov dword [rsp + 0x70], 0xfffffffb
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x70]
call fcn.14008a198
mov dword [rsp + 0x74], 0xfffffffc
lea rdx, [0x1400c53e8]
lea rcx, [rsp + 0x74]
call fcn.14008a198
int3