Function at 0x140013560
Capabilities:
Get file size
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov r12, rdx
mov rax, qword [0x1400503c8]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.DLL_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x14001386c
mov r13, rax
lea rdx, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
test eax, eax
je 0x140013863
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x140013863
lea rdi, [rsi + 1]
mov rcx, rdi
call fcn.140036d20
test rax, rax
je 0x140013863
mov rcx, rax
xor edx, edx
mov r8, rdi
mov rdi, rax
call fcn.140033e10
mov dword [rsp + 0x4c], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4c]
mov rcx, r13
mov qword [rsp + 0x40], rdi
mov rdx, rdi
mov r8d, esi
call qword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x14001383c
mov eax, dword [rsp + 0x4c]
cmp qword [rsp + 0x50], rax
jne 0x14001383c
mov rdi, qword [rsp + 0x40]
mov byte [rdi + rax], 0xa
jmp 0x14001365a
mov rbx, rdi
add rbx, 1
mov rdi, rbx
movzx eax, byte [rdi]
cmp al, 0xd
je 0x140013650
cmp al, 0xa
je 0x140013650
mov byte [rsp + 0x58], 0
mov byte [rsp + 0x59], 0x67
mov byte [rsp + 0x5a], 0x1d
movzx eax, byte [rsp + 0x58]
test al, 1
jne 0x140013755
movzx eax, byte [rsp + 0x59]
movzx eax, al
lea ecx, [rax*8]
sub ecx, eax
mov eax, ecx
add eax, 0xffffff35
cwde
imul eax, eax, 0xffff8103
shr eax, 0x10
add eax, ecx
add eax, 0xffffff35
movzx eax, ax
mov edx, eax
shr edx, 0xf
shr eax, 6
add eax, edx
mov edx, eax
shl edx, 7
sub eax, edx
add eax, ecx
add eax, 0xffffff35
add al, 0x7f
movzx eax, al
lea ecx, [rax + rax*2]
shr ecx, 8
mov edx, eax
sub dl, cl
shr dl, 1
add dl, cl
shr dl, 6
movzx ecx, dl
mov edx, ecx
shl edx, 7
sub edx, ecx
sub al, dl
mov byte [rsp + 0x59], al
movzx eax, byte [rsp + 0x5a]
movzx eax, al
lea ecx, [rax*8]
sub ecx, eax
mov eax, ecx
add eax, 0xffffff35
cwde
imul eax, eax, 0xffff8103
shr eax, 0x10
add eax, ecx
add eax, 0xffffff35
movzx eax, ax
mov edx, eax
shr edx, 0xf
shr eax, 6
add eax, edx
mov edx, eax
shl edx, 7
sub eax, edx
add eax, ecx
add eax, 0xffffff35
add al, 0x7f
movzx eax, al
lea ecx, [rax + rax*2]
shr ecx, 8
mov edx, eax
sub dl, cl
shr dl, 1
add dl, cl
shr dl, 6
movzx ecx, dl
mov edx, ecx
shl edx, 7
sub edx, ecx
sub al, dl
mov byte [rsp + 0x5a], al
mov rcx, rdi
lea rdx, [rsp + 0x59]
call qword [sym.imp.SHLWAPI.dll_StrStrIA]
test rax, rax
je 0x140013859
mov rbx, rax
mov rbp, rax
sub rbp, rdi
lea r15, [rbp - 1]
cmp r15, 0x3fff
ja 0x140013653
lea r14, [rbp + 1]
mov rcx, r14
call fcn.140036d20
test rax, rax
je 0x140013859
mov rsi, rax
mov rcx, rax
xor edx, edx
mov r8, r14
call fcn.140033e10
mov rcx, rsi
mov rdx, rdi
mov r8, rbp
call fcn.1400138f0
cmp byte [rsi + rbp - 1], 0xd
jne 0x1400137c5
mov byte [rsi + r15], 0
mov ecx, 0x8010
call fcn.140036d20
test rax, rax
je 0x140013851
mov rdi, rax
mov r8d, 0x8010
mov rcx, rax
xor edx, edx
call fcn.140033e10
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 0x4000
mov ecx, 1
xor edx, edx
mov r8, rsi
mov r9d, ebp
call qword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov rax, rdi
add rax, 0x8000
mov qword [rdi + 0x8000], 0
mov rcx, qword [r12 + 8]
mov qword [rdi + 0x8008], rcx
mov qword [rcx], rdi
mov qword [r12 + 8], rax
mov rcx, rsi
call fcn.140036d0c
jmp 0x140013653
mov rcx, r13
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov rcx, qword [rsp + 0x40]
call fcn.140036d0c
jmp 0x14001386c
mov rcx, rsi
call fcn.140036d0c
mov rcx, qword [rsp + 0x40]
call fcn.140036d0c
mov rcx, r13
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.140031ee0
nop
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret