Function at 0x140006510
Capabilities:
Get file size
Read file on windows
Set current directory

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
mov qword [rax + 0x18], r8
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x4f]
sub rsp, 0xc0
mov rbx, r8
mov rdi, rcx
mov r8d, 0x4000
lea rcx, [rbp + 0x17]
mov edx, 0x40000
call fcn.1400076a0
xor r13d, r13d
test rbx, rbx
je 0x1400069d8
mov ecx, dword [rdi + 0x1910]
lea eax, [rcx - 1]
cmp eax, 0x62
ja 0x1400069d8
dec ecx
mov qword [rbp - 0x31], r13
shl rcx, 5
or r15, 0xffffffffffffffff
mov rdx, rbx
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x21], r13
mov esi, r13d
mov word [rbp - 0x19], 0x100
mov r14d, r15d
mov rax, qword [rcx + rdi + 0xc90]
lea rcx, [rbp - 0x31]
mov qword [rbp - 0x39], rax
mov qword [rbp - 0x59], r13
mov qword [rbp - 0x51], r13
mov qword [rbp - 0x49], r13
mov word [rbp - 0x41], 0x100
mov qword [rbp - 0x11], r13
mov qword [rbp - 9], r13
mov qword [rbp - 1], r13
mov word [rbp + 7], 0x100
call fcn.140006d08
mov ebx, eax
test eax, eax
js 0x1400069aa
lea r12, [0x140016f94]
cmp dword [rdi + 0x1914], r13d
je 0x140006615
cmp qword [rbp - 0x21], r13
lea ecx, [r13 + 1]
mov rbx, r12
cmovne rbx, qword [rbp - 0x31]
call sub.api_ms_win_crt_private_l1_1_0.dll__o___acrt_iob_func
mov r9d, dword [rdi + 0x1910]
lea rdx, str.Opening_file___ws___stack_top___d__n
mov rcx, rax
mov r8, rbx
call fcn.140010454
mov rax, qword [rbp - 0x39]
mov r13, r15
cmp dword [rdi + 0x1914], 0
je 0x140006634
mov rdx, rax
lea rcx, str.Current_working_dir___ws__n
call fcn.1400104a0
cmp qword [rbp - 0x21], 0
mov rbx, r12
cmovne rbx, qword [rbp - 0x31]
xor r9d, r9d
mov rcx, rbx
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFullPathNameW]
nop dword [rax + rax]
test eax, eax
je 0x1400069a5
mov r9d, eax
lea r8, [rbp + 0xf]
lea rdx, [rbp - 0x59]
mov rcx, rbx
call fcn.140007194
mov rsi, qword [rbp - 0x59]
mov ebx, eax
test eax, eax
js 0x1400069aa
mov rbx, qword [rbp - 0x49]
mov rcx, r12
test rbx, rbx
cmovne rcx, rsi
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
cmp rax, r15
jne 0x14000675e
inc r14d
inc r13
cmp r14d, dword [rdi + 0xc88]
jge 0x140006754
mov rax, r13
lea rsi, [rdi + 8]
shl rax, 5
add rsi, rax
cmp qword [rsi + 0x10], 0
mov rcx, r12
je 0x1400066ee
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
test eax, eax
jne 0x140006736
cmp dword [rdi + 0x1914], eax
je 0x140006723
mov rbx, qword [rsi]
lea ecx, [rax + 1]
call sub.api_ms_win_crt_private_l1_1_0.dll__o___acrt_iob_func
mov rcx, rax
lea rdx, str.Could_not_set_cur_dir:___ws__n
mov r8, rbx
call fcn.140010454
inc r14d
inc r13
add rsi, 0x20
cmp r14d, dword [rdi + 0xc88]
jl 0x1400066e1
mov rsi, qword [rbp - 0x59]
cmp r14d, dword [rdi + 0xc88]
jge 0x140006754
mov rax, r13
shl rax, 5
mov rax, qword [rax + rdi + 8]
jmp 0x14000661c
mov ebx, 0x88790002
jmp 0x1400069aa
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
test rbx, rbx
mov rcx, r12
mov edx, 0x80000000
cmovne rcx, rsi
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
xor r9d, r9d
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
test rbx, rbx
lea rcx, [rbp - 0x11]
mov rdx, r12
mov r8d, 0xfde9
cmovne rdx, rsi
mov r13, rax
call fcn.140006f24
mov ebx, eax
test eax, eax
js 0x1400069aa
cmp dword [rdi + 0x1914], 0
je 0x1400067f9
cmp qword [rbp - 0x49], 0
mov rbx, r12
mov ecx, 1
cmovne rbx, rsi
call sub.api_ms_win_crt_private_l1_1_0.dll__o___acrt_iob_func
mov rcx, rax
lea rdx, str.Resolved_to___ws__n
mov r8, rbx
call fcn.140010454
cmp r13, r15
je 0x1400069a5
mov rdx, qword [rbp + 0xf]
test rdx, rdx
je 0x140006996
sub rdx, rsi
lea rcx, [rbp - 0x59]
sar rdx, 1
call fcn.140006b68
mov ebx, eax
test eax, eax
js 0x14000698c
mov eax, dword [rdi + 0x1910]
lea rcx, [rdi + 0xc90]
shl rax, 5
lea rdx, [rbp - 0x59]
add rcx, rax
call fcn.140006a8c
mov ebx, eax
test eax, eax
js 0x14000698c
mov eax, dword [rdi + 0x1910]
shl rax, 5
cmp qword [rax + rdi + 0xca0], 0
je 0x14000686c
mov r12, qword [rax + rdi + 0xc90]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
test eax, eax
je 0x140006992
mov rax, qword [rbp + 0x67]
mov rcx, r15
inc rcx
cmp byte [rax + rcx], 0
jne 0x14000688a
lea rax, [rcx - 1]
mov r8d, 0xfffffffe
cmp rax, r8
ja 0x140006992
mov rdx, qword [rbp - 1]
lea rax, [rdx - 1]
cmp rax, r8
ja 0x140006992
mov eax, ecx
not eax
cmp rax, rdx
jb 0x140006992
mov esi, edx
add esi, ecx
mov eax, esi
not eax
cmp eax, 0x17
jb 0x140006992
xor edx, edx
mov rcx, r13
add esi, 0x17
call qword [sym.imp.KERNEL32.dll_GetFileSize]
nop dword [rax + rax]
or ecx, 0xffffffff
mov r12d, eax
sub ecx, eax
cmp ecx, esi
jb 0x140006992
lea ecx, [rax + rsi]
call fcn.14000f73c
mov r14, rax
test rax, rax
je 0x140006992
mov rcx, qword [rbp - 0x11]
lea r8, str.hlsl_full_path___s____s__n
mov r9, qword [rbp + 0x67]
mov qword [rsp + 0x20], rcx
mov rcx, rax
mov edx, esi
call fcn.140006158
inc r15
cmp byte [r14 + r15], 0
jne 0x14000692b
and qword [rsp + 0x20], 0
lea r9, [rbp - 0x39]
mov esi, r15d
mov r8d, r12d
add rsi, r14
mov rcx, r13
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
je 0x140006992
cmp dword [rbp - 0x39], r12d
jne 0x140006992
mov rax, qword [rbp + 0x77]
sub esi, r14d
add esi, r12d
mov rcx, r13
mov qword [rax], r14
mov rax, qword [rbp + 0x7f]
mov dword [rax], esi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
inc dword [rdi + 0x1910]
mov rsi, qword [rbp - 0x59]
jmp 0x1400069aa
mov rsi, qword [rbp - 0x59]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov ebx, 0x80004005
cmp byte [rbp + 7], 0
je 0x1400069b9
mov rcx, qword [rbp - 0x11]
call fcn.14000f730
cmp byte [rbp - 0x41], 0
je 0x1400069c7
mov rcx, rsi
call fcn.14000f730
cmp byte [rbp - 0x19], 0
je 0x1400069dd
mov rcx, qword [rbp - 0x31]
call fcn.14000f730
jmp 0x1400069dd
mov ebx, 0x80004005
lea rcx, [rbp + 0x17]
call fcn.140007758
lea r11, [rsp + 0xc0]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret