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

Disassembly:
mov r11, rsp
push r13
push r14
push r15
sub rsp, 0x2a0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [r11 + 8], rsi
mov qword [r11 + 0x18], rdi
mov qword [r11 + 0x20], r12
mov rax, qword [0x01044480]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov r13, r8
mov rsi, rdx
mov r12, qword [rsp + 0x2e0]
xor edi, edi
mov r14d, 0x80004005
mov qword [rsp + 0x58], rdi
and qword [rsp + 0x40], rdi
and qword [rsp + 0x38], rdi
mov r15d, 0x104
mov qword [rsp + 0x30], r15
lea rax, [r11 - 0x238]
mov qword [rsp + 0x28], rax
and qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call fcn.010355a8
lea r8, [0x0100def8]
mov rdx, r15
lea rcx, [rsp + 0x80]
call fcn.01011774
test eax, eax
mov eax, r14d
cmovne r14d, eax
mov r8, r13
mov rdx, r15
mov rcx, r12
call fcn.0100ec98
test eax, eax
mov r13d, 0x80004005
cmovne r14d, r13d
lea r8, [rsp + 0x80]
mov rdx, r15
mov rcx, r12
call fcn.01011774
test eax, eax
cmovne r14d, r13d
mov byte [rsp + 0x70], 0x45
mov byte [rsp + 0x71], 0x50
mov byte [rsp + 0x72], 0x53
mov byte [rsp + 0x73], 0x4f
mov byte [rsp + 0x74], 0x4e
and qword [rsp + 0x30], rdi
mov r15d, 0x80
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rdi + 1]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
je 0x1026461
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r13d, eax
cmp eax, 0xffffffff
je 0x1026461
cmp eax, 5
jb 0x1026461
and dword [rsp + 0x50], edi
and qword [rsp + 0x20], rdi
lea r9, [rsp + 0x50]
lea r8d, [rdi + 5]
lea rdx, [rsp + 0x78]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1026461
cmp dword [rsp + 0x50], 5
jb 0x1026461
lea rax, [rsp + 0x70]
lea rcx, [rsp + 0x78]
mov edx, dword [rax]
cmp edx, dword [rcx]
jne 0x10263c6
mov dl, byte [rax + 4]
cmp dl, byte [rcx + 4]
jne 0x10263c6
xor eax, eax
jmp 0x10263cb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x1026461
add r13d, 0xfffffffb
mov ecx, r13d
call fcn.01028e1c
mov rdi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x1026461
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, r13d
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1026461
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x1026461
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, r13d
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
jmp 0x1026472
test rsi, rsi
je 0x1026480
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x102648d
mov rcx, rdi
call fcn.01028de4
mov eax, r14d
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.01028cb0
lea r11, [rsp + 0x2a0]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret