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

Disassembly:
push rbx
push rbp
push rdi
push r13
push r14
push r15
sub rsp, 0x468
mov rax, qword [0x180038240]
xor rax, rsp
mov qword [rsp + 0x450], rax
xor ebx, ebx
mov r15, r8
mov r14, rdx
mov r13d, ebx
mov ebp, ebx
test rdx, rdx
je 0x18000547e
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 rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x18000545c
lea eax, [rbx + 0xe]
jmp 0x1800055d7
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test eax, eax
je 0x180005474
cmp eax, 0x200000
jle 0x1800054d5
mov ebx, 0x16
jmp 0x1800055ba
call sym.dcapi.dll_dc_disk_open
mov r13, rax
test rax, rax
jne 0x180005494
lea eax, [r13 + 0xd]
jmp 0x1800055d7
lea rdx, [rsp + 0x250]
xor r9d, r9d
mov r8d, 0x200
mov rcx, rax
call sym.dcapi.dll_dc_disk_read
mov ebx, eax
test eax, eax
jne 0x1800054c7
mov eax, 0xaa55
cmp word [rsp + 0x44e], ax
je 0x1800054f5
mov ebx, 0x12
mov edi, dword [rsp + 0x40]
test ebx, ebx
jne 0x1800055c8
xor ebx, ebx
movsxd rcx, edi
mov qword [rsp + 0x460], r12
call fcn.1800165f8
mov r12, rax
test rax, rax
jne 0x18000552f
lea ebx, [rax + 9]
jmp 0x1800055b2
mov eax, dword [rsp + 0x252]
cmp eax, 0x10eb9090
je 0x180005511
cmp eax, 0x20b60251
je 0x180005511
mov ebx, 0x15
jmp 0x1800054c7
mov rax, qword [rsp + 0x25e]
movzx edi, word [rsp + 0x258]
shl rax, 9
shl edi, 9
mov qword [rsp + 0x48], rax
jmp 0x1800054cb
mov r8d, edi
mov rdx, rax
test r14, r14
je 0x180005556
lea r9, [rsp + 0x40]
mov rcx, rbp
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180005569
lea ebx, [rax + 0xf]
jmp 0x1800055aa
mov r9, qword [rsp + 0x48]
mov rcx, r13
call sym.dcapi.dll_dc_disk_read
mov ebx, eax
test eax, eax
jne 0x1800055aa
mov qword [rsp + 0x4b0], rsi
mov eax, edi
mov rsi, r12
cmp edi, 0x35a
jbe 0x18000559d
nop
cmp dword [rsi], 0x1434a669
jne 0x180005591
cmp dword [rsi + 4], 0x7269da46
je 0x1800055f8
dec eax
inc rsi
cmp eax, 0x35a
ja 0x180005580
mov ebx, 0x17
mov rsi, qword [rsp + 0x4b0]
mov rcx, r12
call fcn.180016574
mov r12, qword [rsp + 0x460]
test rbp, rbp
je 0x1800055c8
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13, r13
je 0x1800055d5
mov rcx, r13
call sym.dcapi.dll_dc_disk_close
mov eax, ebx
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.180015920
add rsp, 0x468
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret
test rsi, rsi
je 0x18000559d
lea rcx, [rsp + 0x50]
lea rdx, [rsi + 0x116]
mov r8d, 0x200
call fcn.180016100
mov rcx, rsi
mov rdx, r15
mov r8d, 0x35a
call fcn.180016100
lea rcx, [rsi + 0x116]
lea rdx, [rsp + 0x50]
mov r8d, 0x200
call fcn.180016100
mov dword [rsi], 0x1434a669
mov dword [rsi + 4], 0x7269da46
mov dword [rsi + 8], 0x76
test r14, r14
je 0x180005698
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea r9, [rsp + 0x40]
mov r8d, edi
mov rdx, r12
mov rcx, rbp
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1800056b5
lea ebx, [rax + 0xf]
jmp 0x1800055a2
mov r9, qword [rsp + 0x48]
mov r8d, edi
mov rdx, r12
mov rcx, r13
call sym.dcapi.dll_dc_disk_write
mov ebx, eax
test eax, eax
jne 0x1800055a2
xor ebx, ebx
jmp 0x1800055a2