Function at 0x140015d50
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x90
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x80], rbx
mov qword [rbp + 0x88], rsi
mov qword [rbp + 0x90], rdi
mov rax, qword [0x1400b2ac0]
xor rax, rbp
mov qword [rbp + 0x48], rax
mov rbx, rdx
mov r12, rcx
mov qword [rbp + 0x30], rcx
xor esi, esi
mov rdi, rsi
mov qword [rbp + 0x20], rsi
mov dword [rbp + 0x14], 0x100
mov ecx, 0x100
call fcn.14001c610
mov r13, rax
mov qword [rbp + 8], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rbp + 0x28], eax
cmp eax, 0xffffffff
je 0x140005863
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rsi + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
mov qword [rbp + 0x20], rax
cmp rax, 0xffffffffffffffff
je 0x140005863
mov r14d, esi
mov dword [rbp + 0x1c], esi
mov eax, 0x8000
call fcn.14007a150
sub rsp, rax
lea r15, [rsp + 0x40]
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x10]
mov r8d, eax
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140005863
mov ecx, esi
mov dword [rbp + 0x2c], ecx
mov r8d, dword [rbp + 0x10]
cmp ecx, r8d
jae 0x140005672
mov eax, ecx
movzx edx, byte [rax + r15]
cmp dl, 0xd
je 0x140005672
cmp dl, 0xa
je 0x140005672
inc ecx
mov dword [rbp + 0x2c], ecx
jmp 0x140005655
cmp esi, r8d
jne 0x14000567b
mov eax, esi
jmp 0x1400056a6
mov eax, esi
cmp byte [rax + r15], 0xa
jne 0x14000568b
mov eax, 1
jmp 0x1400056a6
lea eax, [r8 - 1]
cmp esi, eax
jae 0x1400056a1
lea eax, [rsi + 1]
cmp byte [rax + r15], 0xa
jne 0x1400056a1
mov eax, esi
jmp 0x1400056a6
mov eax, 2
mov dword [r12 + 0x4c], eax
cdqe
lea rbx, [0x141a1bde8]
mov rbx, qword [rbx + rax*8]
mov qword [rbp + 0x40], rbx
lea rcx, [r12 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.140007200
mov r12d, esi
mov dword [rbp + 0x18], esi
mov edi, esi
mov dword [rbp], esi
nop dword [rax]
mov ecx, dword [rbp + 0x10]
cmp r12d, ecx
jae 0x1400057d9
mov eax, r12d
movsx r13d, byte [rax + r15]
mov dword [rbp + 0x38], r13d
inc r12d
mov dword [rbp + 0x18], r12d
cmp r12d, ecx
jne 0x140005733
cmp ecx, 0x8000
jne 0x140005733
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x10]
mov r8d, ecx
mov rdx, r15
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000585b
mov r12d, esi
mov dword [rbp + 0x18], esi
movsxd rax, r14d
mov rdx, qword [rbp + 8]
mov byte [rax + rdx], r13b
inc r14d
mov dword [rbp + 0x1c], r14d
mov eax, dword [rbp + 0x14]
cmp r14d, eax
jne 0x140005786
add eax, 0x100
mov dword [rbp + 0x14], eax
mov dword [rbp + 0x3c], eax
movsxd rcx, eax
call fcn.14001c610
mov rbx, rax
movsxd r8, r14d
mov rdx, qword [rbp + 8]
mov rcx, rax
call fcn.140063b70
mov rcx, qword [rbp + 8]
call fcn.14001c608
mov rdx, rbx
mov qword [rbp + 8], rbx
mov rbx, qword [rbp + 0x40]
movsxd rax, edi
cmp r13b, byte [rax + rbx]
jne 0x1400057cf
inc edi
mov dword [rbp], edi
movsxd rcx, edi
cmp byte [rcx + rbx], 0
jne 0x1400057d4
movsxd rax, r14d
sub rax, rcx
mov byte [rax + rdx], 0
mov rcx, rdx
call fcn.140004ef0
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rcx, qword [rbp + 0x30]
call fcn.140005260
mov r14d, esi
mov dword [rbp + 0x1c], esi
mov edi, esi
mov dword [rbp], esi
jmp 0x1400057d4
mov edi, esi
mov dword [rbp], esi
jmp 0x1400056e0
movsxd rax, r14d
mov r13, qword [rbp + 8]
mov byte [rax + r13], 0
mov rcx, r13
call fcn.140004ef0
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rbx, qword [rbp + 0x30]
mov rcx, rbx
call fcn.140005260
mov dword [rbx + 0x40], 1
mov eax, dword [rbp + 0x28]
and eax, 1
mov dword [rbx + 0x44], eax
mov dword [rbx + 0x48], esi
mov dword [rbx + 0xb4], esi
mov dword [rbx + 0xb0], esi
mov dword [rbx + 0x54], 0x80000
mov dword [rbx + 0xa8], esi
mov dword [rbx + 0xac], esi
mov esi, 1
mov dword [rsp + 0x20], 0xffffffff
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.1400060c0
mov rdi, qword [rbp + 0x20]
jmp 0x140005863
mov r13, qword [rbp + 8]
mov rdi, qword [rbp + 0x20]
test r13, r13
je 0x140005870
mov rcx, r13
call fcn.14001c608
test rdi, rdi
je 0x14000587e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x48]
xor rcx, rbp
call fcn.140060cc0
mov rbx, qword [rbp + 0x80]
mov rsi, qword [rbp + 0x88]
mov rdi, qword [rbp + 0x90]
lea rsp, [rbp + 0x50]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rdi, rcx
call fcn.14004c510
test eax, eax
jne 0x140015d74
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
lea rcx, [rdi + 0xa0]
or r8d, 0xffffffff
mov rdx, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x140005560