Function at 0x1400050d0
Capabilities:
Check if file exists
Get file attributes
Read file on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0xa0
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x90], rbx
mov qword [rbp + 0x98], rsi
mov qword [rbp + 0xa0], rdi
mov rax, qword [0x1400b2c70]
xor rax, rbp
mov qword [rbp + 0x50], rax
mov rbx, rdx
mov r12, rcx
xor edi, edi
mov r14, rdi
mov qword [rbp + 0x30], rdi
mov eax, 0x100
mov dword [rbp + 0xc], eax
mov rcx, rax
call fcn.14001b02c
mov rsi, rax
mov qword [rbp + 0x28], rax
mov r13d, edi
mov dword [rbp + 0x24], edi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [rbp + 0x20], eax
cmp eax, 0xffffffff
je 0x14000547f
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rdi + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov qword [rbp + 0x30], rax
cmp rax, 0xffffffffffffffff
je 0x14000547f
mov r15d, edi
mov dword [rbp + 0x10], edi
mov eax, 0x8000
call fcn.140079100
sub rsp, rax
lea rbx, [rsp + 0x40]
mov qword [rbp + 0x38], rbx
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 4]
mov r8d, eax
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
je 0x14000547f
mov ecx, edi
mov dword [rbp + 0x1c], ecx
mov r8b, 0xa
mov edx, dword [rbp + 4]
cmp ecx, edx
jae 0x1400051e5
mov eax, ecx
cmp byte [rax + rbx], 0xd
je 0x1400051e5
cmp byte [rax + rbx], r8b
je 0x1400051e5
inc ecx
mov dword [rbp + 0x1c], ecx
jmp 0x1400051cc
cmp edi, edx
jne 0x1400051ed
mov eax, edi
jmp 0x140005215
mov eax, edi
cmp byte [rax + rbx], r8b
jne 0x1400051fc
mov eax, 1
jmp 0x140005215
lea eax, [rdx - 1]
cmp edi, eax
jae 0x140005210
lea eax, [rdi + 1]
cmp byte [rax + rbx], r8b
jne 0x140005210
mov eax, edi
jmp 0x140005215
mov eax, 2
mov dword [r12 + 0x4c], eax
cdqe
lea rcx, [0x1415102a8]
mov rax, qword [rcx + rax*8]
mov qword [rbp + 0x48], rax
lea rcx, [r12 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.140006c28
mov ebx, edi
mov dword [rbp + 8], ebx
mov r13d, edi
mov dword [rbp], edi
call fcn.140003e38
mov dword [rbp + 0x18], eax
mov edx, dword [rbp + 4]
cmp ebx, edx
jae 0x1400053a5
mov ecx, ebx
mov r10, qword [rbp + 0x38]
movsx eax, byte [rcx + r10]
mov dword [rbp + 0x14], eax
inc ebx
mov dword [rbp + 8], ebx
cmp ebx, edx
jne 0x14000529d
cmp edx, 0x8000
jne 0x14000529d
mov qword [rsp + 0x20], rdi
lea r9, [rbp + 4]
mov r8d, edx
mov rdx, r10
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
je 0x14000547b
mov dword [rbp + 8], edi
movsxd rax, r15d
mov ecx, dword [rbp + 0x14]
mov byte [rax + rsi], cl
inc r15d
mov dword [rbp + 0x10], r15d
mov eax, dword [rbp + 0xc]
cmp r15d, eax
jne 0x1400052eb
add eax, 0x100
mov dword [rbp + 0xc], eax
mov dword [rbp + 0x40], eax
movsxd rcx, eax
call fcn.14001b02c
mov rbx, rax
movsxd r8, r15d
mov rdx, rsi
mov rcx, rax
call fcn.140062030
mov rcx, rsi
call fcn.14001b034
mov rsi, rbx
mov qword [rbp + 0x28], rbx
mov ecx, dword [rbp + 0x14]
movsxd rax, r13d
mov rdx, qword [rbp + 0x48]
cmp cl, byte [rax + rdx]
jne 0x140005397
inc r13d
mov dword [rbp], r13d
movsxd rcx, r13d
cmp byte [rcx + rdx], dil
jne 0x14000539d
movsxd rax, r15d
sub rax, rcx
mov byte [rax + rsi], dil
cmp rsi, rdi
jne 0x140005323
mov rax, rdi
jmp 0x140005377
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea r8d, [rax + 1]
cmp r8d, 0x3fffffff
jle 0x14000533e
mov rax, rdi
jmp 0x140005377
movsxd rax, r8d
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140005357
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.140079100
sub rsp, rcx
lea rcx, [rsp + 0x40]
mov r9d, dword [rbp + 0x18]
mov rdx, rsi
call fcn.140004a94
or r9d, 0xffffffff
or r8d, r9d
mov rdx, rax
mov rcx, r12
call fcn.140004dc0
mov r15d, edi
mov dword [rbp + 0x10], edi
mov r13d, edi
mov dword [rbp], edi
jmp 0x14000539d
mov r13d, edi
mov dword [rbp], edi
mov ebx, dword [rbp + 8]
jmp 0x140005250
movsxd rax, r15d
mov byte [rax + rsi], dil
cmp rsi, rdi
jne 0x1400053b6
mov rax, rdi
jmp 0x14000540a
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea r8d, [rax + 1]
cmp r8d, 0x3fffffff
jle 0x1400053d1
mov rax, rdi
jmp 0x14000540a
movsxd rax, r8d
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1400053ea
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.140079100
sub rsp, rcx
lea rcx, [rsp + 0x40]
mov r9d, dword [rbp + 0x18]
mov rdx, rsi
call fcn.140004a94
or r9d, 0xffffffff
or r8d, r9d
mov rdx, rax
mov rcx, r12
call fcn.140004dc0
mov ecx, 1
mov dword [r12 + 0x40], ecx
mov eax, dword [rbp + 0x20]
and eax, ecx
mov dword [r12 + 0x44], eax
mov dword [r12 + 0x48], edi
mov dword [r12 + 0xb4], edi
mov dword [r12 + 0xb0], edi
mov dword [r12 + 0x54], 0x80000
mov dword [r12 + 0xa8], edi
mov dword [r12 + 0xac], edi
mov r13d, ecx
or dword [rsp + 0x20], 0xffffffff
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, r12
call fcn.140005c98
jmp 0x14000547f
mov r13d, dword [rbp + 0x24]
cmp rsi, rdi
je 0x14000548c
mov rcx, rsi
call fcn.14001b034
cmp r14, rdi
je 0x14000549a
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r13d
mov rcx, qword [rbp + 0x50]
xor rcx, rbp
call fcn.14005f880
mov rbx, qword [rbp + 0x90]
mov rsi, qword [rbp + 0x98]
mov rdi, qword [rbp + 0xa0]
lea rsp, [rbp + 0x60]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret