Function at 0x140003590
Capabilities:
Clear file content
Get file size
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x98
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0xffffffffffffffff
jne 0x1400035ea
xor al, al
jmp 0x140003821
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov r8d, 3
mov edx, 0x40000000
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0xffffffffffffffff
jne 0x14000363e
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140003821
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [rsp + 0x5c], 0
lea rdx, [rsp + 0x5c]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x5c]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
shl rax, 0x20
mov qword [rsp + 0x40], rax
mov ecx, dword [rsp + 0x58]
mov rax, qword [rsp + 0x40]
or rax, rcx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0
mov dword [rsp + 0x68], 0x100000
mov ecx, dword [rsp + 0x68]
call fcn.1400060e4
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x1400036d1
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140003821
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x48], rax
jae 0x1400037ff
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
sub rcx, rax
mov eax, dword [rsp + 0x68]
cmp rcx, rax
jbe 0x140003704
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x80], eax
jmp 0x140003718
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x40]
sub rax, rcx
mov dword [rsp + 0x80], eax
mov dword [rsp + 0x7c], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x7c]
mov r8d, dword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14000376e
mov rcx, qword [rsp + 0x60]
call fcn.140005d54
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140003821
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x78], eax
mov dword [rsp + 0x84], 0
cmp dword [rsp + 0x78], 0
jbe 0x1400037e9
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x84]
mov r8d, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400037d6
mov rcx, qword [rsp + 0x60]
call fcn.140005d54
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x140003821
mov ecx, dword [rsp + 0x84]
mov eax, dword [rsp + 0x78]
sub eax, ecx
mov dword [rsp + 0x78], eax
jmp 0x140003781
mov ecx, dword [rsp + 0x7c]
mov rax, qword [rsp + 0x48]
add rax, rcx
mov qword [rsp + 0x48], rax
jmp 0x1400036d1
mov rcx, qword [rsp + 0x60]
call fcn.140005d54
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
add rsp, 0x98
ret