Function at 0x1400489b0
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc8
mov r13, rcx
mov rax, qword [0x14022f038]
xor rax, rsp
mov qword [rsp + 0xc0], rax
cmp r8, 7
jbe 0x140048f05
mov r14, r8
mov rbx, rdx
mov eax, dword [rdx]
cmp rax, r8
jne 0x140048f05
movzx eax, word [rbx + 6]
xor ebp, ebp
mov word [rsp + 0x30], ax
test ax, ax
cmovne rbp, rbx
test rbp, rbp
je 0x140048ead
movzx r15d, word [rbp + 4]
cmp r15d, 0x10
jb 0x140048f05
cmp dword [rbp], r15d
jb 0x140048f05
test r15b, 7
jne 0x140048f05
lea rax, [r15 - 0x10]
sub r14, r15
add r15, rbx
lea r8, [rbp + 8]
lea r10, [rbx + 4]
test rbp, rbp
mov rcx, r8
cmove rcx, r10
cmp rax, 0x103
ja 0x140048f05
mov r12, rax
shr r12, 2
movzx edx, word [rcx]
mov rcx, rdx
mov qword [rsp + 0x28], rdx
cmp edx, r12d
ja 0x140048f05
mov qword [rsp + 0x48], r10
mov qword [rsp + 0x50], r8
mov qword [rsp + 0x38], r13
cmp r9d, 1
jne 0x140048a95
cmp word [rsp + 0x28], 0
jne 0x140048f00
mov cl, byte [0x1402401c4]
cmp rax, 3
ja 0x140048ad4
lea rax, [r14 + 0x10]
cmp rax, 0xf0
ja 0x140048ad4
and cl, 1
je 0x140048ad4
xor r13d, r13d
cmp word [rsp + 0x30], 0
setne r13b
lea rsi, [r14 + r13*8]
add rsi, 8
cmp rsi, 0xf0
jbe 0x140048d06
mov ecx, 0x48
call fcn.14014c3b0
mov rdi, rax
movzx eax, word [rsp + 0x30]
mov word [rsp + 0x20], ax
mov rcx, rdi
mov rdx, r14
mov r8, r14
mov r9, r12
call fcn.14018b3e0
test r14, r14
mov r13, qword [rsp + 0x38]
je 0x140048b5d
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
movzx r12d, word [rax + 6]
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
mov rsi, rax
test r12w, r12w
je 0x140048ee7
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
movzx eax, word [rax + 4]
add rsi, rax
mov rcx, rsi
mov rdx, r15
mov r8, r14
call fcn.14014f780
test rbp, rbp
je 0x140048ebc
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
cmp word [rax + 4], 0x10
je 0x140048bc1
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
mov rsi, rax
add rsi, 0x10
add rbx, 0x10
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
movzx r8d, word [rax + 4]
add r8, 0xfffffffffffffff0
cmp r8, 8
jne 0x140048ef0
mov rax, qword [rbx]
mov qword [rsi], rax
mov rax, qword [rsp + 0x50]
movzx esi, word [rax]
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
mov word [rax + 8], si
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x140048edd
lea rax, [rax*8]
lea r14, [rax + rax*4]
mov rcx, r14
call fcn.14014c3b0
mov r12, rax
lea rbx, [rax + r14]
xor esi, esi
mov rcx, r12
add rcx, rsi
je 0x140048e1d
call fcn.140052ad0
add rsi, 0x28
cmp r14, rsi
jne 0x140048c08
cmp word [rsp + 0x28], 0
je 0x140048cbb
mov qword [rsp + 0x30], rbx
xor ebp, ebp
mov rbx, r12
mov rax, qword [rdi + 0x40]
movsxd rsi, dword [rax + rbp*4]
mov rcx, rsi
call fcn.140052fb0
test al, al
jne 0x140048e75
mov r8, qword [rsp + 0x130]
test r8, r8
je 0x140048d66
mov r15, r13
lea r13, [rsp + 0x70]
mov rcx, r13
mov rdx, rsi
call fcn.140052fc0
lea rsi, [rsp + 0x98]
mov rcx, rsi
mov rdx, r13
call fcn.140052b00
cmp rbp, qword [rsp + 0x28]
jae 0x140048e49
mov rcx, rbx
mov rdx, rsi
call fcn.140052c20
mov rcx, rsi
call fcn.1400f5350
mov r13, r15
inc rbp
add rbx, 0x28
cmp qword [rsp + 0x28], rbp
jne 0x140048c38
mov rbx, qword [rsp + 0x30]
lea rdx, [rsp + 0x58]
mov qword [rdx], r12
mov qword [rdx + 8], rbx
mov qword [rdx + 0x10], rbx
mov rax, qword [rdi]
mov rax, qword [rax + 0x28]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
mov qword [r13], rdi
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.14014ced0
mov rax, r13
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0x100
call fcn.14014c3b0
mov rdi, rax
lea rax, fcn.1400f0a90
mov qword [rdi], rax
lea rcx, [rdi + 0x14]
mov r8d, 0xec
mov qword [rsp + 0x40], rcx
xor edx, edx
call fcn.14014fe30
mov qword [rdi + 8], rsi
mov dword [rdi + 0x10], esi
movzx eax, word [rsp + 0x30]
mov word [rdi + 0x16], ax
test ax, ax
je 0x140048d58
lea rax, [r13*8 + 8]
mov rcx, qword [rsp + 0x40]
mov word [rcx], ax
test rdi, rdi
jne 0x140048afc
jmp 0x140048ad4
mov qword [rsp + 0x80], 0
test esi, esi
je 0x140048db0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
mov rax, qword [rsp + 0x80]
inc rax
cmp rax, 2
jae 0x140048dfa
lea rax, [rsi + 1]
cmp rax, 2
jb 0x140048da7
mov qword [rsp + 0x80], rsi
call fcn.140100430
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r15, [rsp + 0x88]
mov rcx, r15
lea rdx, [rsp + 0x80]
call fcn.1400b9350
lea rsi, [rsp + 0x98]
mov rcx, rsi
mov rdx, r15
call fcn.140052b00
cmp rbp, qword [rsp + 0x28]
jae 0x140048e49
mov rcx, rbx
mov rdx, rsi
call fcn.140052c20
mov rcx, rsi
call fcn.1400f5350
jmp 0x140048ca8
call fcn.140100430
mov rcx, qword [rsp + 0x80]
call fcn.140112e70
mov qword [rsp + 0x80], 0
jmp 0x140048d90
lea rax, str.null_pointer_given_to_construct_at
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s
lea rdx, str....._buildtools_third_partylibc_trunkinclude__memoryconstruct_at.h
lea r9, str.__location___nullptr
mov r8d, 0x23
call fcn.14018a2b0
lea rax, str.vector___index_out_of_bounds
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s
lea rdx, str....._buildtools_third_partylibc_trunkinclude_vector
lea r9, str.__n___size__
mov r8d, 0x587
call fcn.14018a2b0
mov qword [r13], 0
test r12, r12
jne 0x140048f12
test rdi, rdi
mov r13, qword [rsp + 0x38]
je 0x140048cdf
mov rax, qword [rdi]
mov rax, qword [rax]
mov rcx, rdi
mov edx, 1
call qword [case.0x1401b58f0.0]
jmp 0x140048cdf
add r14, 0xfffffffffffffff8
lea r15, [rbx + 8]
xor eax, eax
jmp 0x140048a3b
mov rax, qword [rsp + 0x48]
movzx esi, word [rax]
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b58f0.0]
mov word [rax + 4], si
jmp 0x140048bdd
xor ebx, ebx
xor r12d, r12d
jmp 0x140048cbb
add rsi, 8
jmp 0x140048b4f
mov rcx, rsi
mov rdx, rbx
call fcn.14014f780
jmp 0x140048bc1
mov r13, qword [rsp + 0x38]
mov qword [r13], 0
jmp 0x140048cdf
neg r14
mov rax, qword [rsp + 0x28]
lea rax, [rax + rax*4]
lea rsi, [r12 + rax*8]
add rsi, 0xffffffffffffffd8
mov rcx, rsi
call fcn.1400f5350
add rsi, 0xffffffffffffffd8
add r14, 0x28
jne 0x140048f26
mov rcx, r12
call fcn.14014c3ec
jmp 0x140048e86