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

Disassembly:
push rbx
push rbp
push rsi
push r12
push r14
sub rsp, 0x470
mov rax, qword [0x18002d000]
xor rax, rsp
mov qword [rsp + 0x460], rax
xor ebx, ebx
mov qword [rsp + 0x50], r8
mov r14, rdx
mov ebp, ebx
mov r12d, ebx
test rdx, rdx
je 0x1800194ae
mov qword [rsp + 0x30], rbx
lea r8d, [rbx + 1]
xor r9d, r9d
mov edx, 0xc0000000
mov rcx, r14
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x18001948c
lea eax, [rbx + 0xe]
jmp 0x1800195c3
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x1800194a4
cmp eax, 0x200000
jle 0x1800194ed
mov ebx, 0x16
jmp 0x18001959b
call sym.dcapi.dll_dc_disk_open
mov rbp, rax
test rax, rax
jne 0x1800194c3
lea eax, [rbp + 0xd]
jmp 0x1800195c3
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x260]
mov rcx, rax
call fcn.180018b10
mov ebx, eax
test eax, eax
jne 0x1800195a9
mov esi, dword [rsp + 0x40]
xor ebx, ebx
movsxd rcx, esi
mov qword [rsp + 0x4b8], r13
call qword [sym.imp.msvcrt.dll_malloc]
mov r13, rax
test rax, rax
jne 0x18001950e
lea ebx, [rax + 9]
jmp 0x180019593
mov r8d, esi
mov rdx, rax
test r14, r14
je 0x180019535
lea r9, [rsp + 0x44]
mov rcx, r12
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180019548
lea ebx, [rax + 0xf]
jmp 0x18001958a
mov r9, qword [rsp + 0x48]
mov rcx, rbp
call sym.dcapi.dll_dc_disk_read
mov ebx, eax
test eax, eax
jne 0x18001958a
mov qword [rsp + 0x4b0], rdi
mov eax, esi
mov rdi, r13
cmp esi, 0x5c8
jbe 0x18001957d
nop dword [rax]
cmp dword [rdi], 0x1434a669
jne 0x180019571
cmp dword [rdi + 4], 0x7269da46
je 0x1800195e2
dec eax
inc rdi
cmp eax, 0x5c8
ja 0x180019560
mov ebx, 0x17
mov rdi, qword [rsp + 0x4b0]
mov rcx, r13
call qword [sym.imp.msvcrt.dll_free]
mov r13, qword [rsp + 0x4b8]
test r12, r12
je 0x1800195a9
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbp, rbp
je 0x1800195c1
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.msvcrt.dll_free]
mov eax, ebx
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.18000ee20
add rsp, 0x470
pop r14
pop r12
pop rsi
pop rbp
pop rbx
ret
test rdi, rdi
je 0x18001957d
lea rcx, [rsp + 0x60]
lea rdx, [rdi + 0x116]
mov r8d, 0x200
call sub.msvcrt.dll_memcpy
mov rdx, qword [rsp + 0x50]
mov rcx, rdi
mov r8d, 0x5c8
call sub.msvcrt.dll_memcpy
lea rcx, [rdi + 0x116]
lea rdx, [rsp + 0x60]
mov r8d, 0x200
call sub.msvcrt.dll_memcpy
mov dword [rdi], 0x1434a669
mov dword [rdi + 4], 0x7269da46
mov dword [rdi + 8], 0x76
test r14, r14
je 0x180019684
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea r9, [rsp + 0x44]
mov r8d, esi
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800196a1
lea ebx, [rax + 0xf]
jmp 0x180019582
mov r9, qword [rsp + 0x48]
mov r8d, esi
mov rdx, r13
mov rcx, rbp
call sym.dcapi.dll_dc_disk_write
mov ebx, eax
test eax, eax
jne 0x180019582
xor ebx, ebx
jmp 0x180019582