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

Disassembly:
jmp 0x140008440
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push r12
push r14
push r15
lea rbp, [rsp - 0x3c0]
sub rsp, 0x4c0
mov r15, r8
mov rbx, rdx
xor r12d, r12d
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov r8d, 3
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400087d6
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov r8d, 3
mov dword [rsp + 0x20], 2
mov rcx, rbx
mov qword [rsp + 0x4f0], rdi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400087c6
xorps xmm0, xmm0
mov dword [rbp - 0x7e], r12d
mov ebx, 0xa
mov dword [rbp - 0x58], r12d
lea rcx, [rsp + 0x58]
mov dword [rsp + 0x6c], ebx
movdqu xmmword [rsp + 0x72], xmm0
mov dword [rbp - 0x72], ebx
mov word [rbp - 0x52], r12w
mov word [rsp + 0x56], r12w
mov dword [rsp + 0x68], 0x4034b50
mov word [rsp + 0x70], r12w
mov word [rbp - 0x6e], r12w
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx edx, word [rsp + 0x58]
mov ecx, 0x7cf
movzx eax, dx
sub ax, cx
cmp ax, 0xb
jbe 0x140008545
mov edx, 0x7d4
movzx ecx, word [rsp + 0x5a]
mov r14d, 1
lea eax, [rcx - 1]
cmp ax, 0xb
jbe 0x14000855c
mov ecx, r14d
movzx r8d, word [rsp + 0x5e]
lea eax, [r8 - 1]
cmp ax, 0x1e
jbe 0x14000856f
mov r8d, ebx
movzx eax, word [rsp + 0x64]
sub dx, 0x3c
shl dx, 4
or dx, cx
shr ax, 1
movzx ecx, word [rsp + 0x60]
shl cx, 6
or cx, word [rsp + 0x62]
shl cx, 5
or cx, ax
shl dx, 5
or dx, r8w
mov word [rsp + 0x72], cx
mov word [rbp - 0x6c], cx
mov rcx, rsi
mov word [rsp + 0x74], dx
mov word [rbp - 0x6a], dx
call fcn.140008110
xor edx, edx
mov dword [rsp + 0x78], eax
mov rcx, rsi
mov dword [rbp - 0x68], eax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
xor edx, edx
mov rcx, rsi
mov dword [rsp + 0x7c], eax
mov dword [rbp - 0x64], eax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, r15
mov dword [rbp - 0x80], eax
mov dword [rbp - 0x60], eax
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea r9, [rbp + 0x408]
mov word [rbp - 0x7a], r12w
mov r8d, 0x20
mov word [rbp - 0x7c], ax
lea rdx, [rsp + 0x68]
mov word [rbp - 0x5c], ax
mov rcx, rdi
mov word [rbp - 0x5a], r12w
mov dword [rbp - 0x4c], r12d
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea r9, [rbp + 0x408]
mov qword [rsp + 0x20], r12
mov r8d, eax
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenA]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
lea ebx, [rax + 0x20]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rbp + 0x408]
mov dword [rbp + 0x408], r12d
mov r8d, 0x400
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400086e2
nop dword [rax]
mov r8d, dword [rbp + 0x408]
test r8d, r8d
je 0x1400086e2
lea r9, [rbp - 0x48]
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
add ebx, dword [rbp + 0x408]
lea r9, [rbp + 0x408]
mov r8d, 0x400
mov dword [rbp + 0x408], r12d
lea rdx, [rbp - 0x40]
mov qword [rsp + 0x20], r12
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140008690
mov eax, 0x14
mov dword [rsp + 0x50], ebx
lea r9, [rbp + 0x408]
mov word [rbp - 0x74], ax
mov r8d, 0x30
mov dword [rbp - 0x78], 0x2014b50
lea rdx, [rbp - 0x78]
mov word [rbp - 0x54], r12w
mov rcx, rdi
mov dword [rbp - 0x50], 0x20
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea r9, [rbp + 0x408]
mov qword [rsp + 0x20], r12
mov r8d, eax
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea r9, [rbp + 0x408]
mov qword [rsp + 0x40], 0x6054b50
mov r8d, 0x18
mov dword [rsp + 0x48], 0x10001
lea rdx, [rsp + 0x40]
mov word [rsp + 0x54], r12w
lea ecx, [rax + 0x30]
mov qword [rsp + 0x20], r12
add ecx, ebx
sub ecx, dword [rsp + 0x50]
mov dword [rsp + 0x4c], ecx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rdi, qword [rsp + 0x4f0]
mov rbx, qword [rsp + 0x4f8]
add rsp, 0x4c0
pop r15
pop r14
pop r12
pop rsi
pop rbp
ret
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 2
jmp 0x1400087a6
mov eax, 1
jmp 0x1400087ae