Function at 0x140047610
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 [0x14022a038]
xor rax, rsp
mov qword [rsp + 0xc0], rax
cmp r8, 7
jbe 0x140047b65
mov r14, r8
mov rbx, rdx
mov eax, dword [rdx]
cmp rax, r8
jne 0x140047b65
movzx eax, word [rbx + 6]
xor ebp, ebp
mov word [rsp + 0x30], ax
test ax, ax
cmovne rbp, rbx
test rbp, rbp
je 0x140047b0d
movzx r15d, word [rbp + 4]
cmp r15d, 0x10
jb 0x140047b65
cmp dword [rbp], r15d
jb 0x140047b65
test r15b, 7
jne 0x140047b65
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 0x140047b65
mov r12, rax
shr r12, 2
movzx edx, word [rcx]
mov rcx, rdx
mov qword [rsp + 0x28], rdx
cmp edx, r12d
ja 0x140047b65
mov qword [rsp + 0x48], r10
mov qword [rsp + 0x50], r8
mov qword [rsp + 0x38], r13
cmp r9d, 1
jne 0x1400476f5
cmp word [rsp + 0x28], 0
jne 0x140047b60
mov cl, byte [0x14023afc4]
cmp rax, 3
ja 0x140047734
lea rax, [r14 + 0x10]
cmp rax, 0xf0
ja 0x140047734
and cl, 1
je 0x140047734
xor r13d, r13d
cmp word [rsp + 0x30], 0
setne r13b
lea rsi, [r14 + r13*8]
add rsi, 8
cmp rsi, 0xf0
jbe 0x140047966
mov ecx, 0x48
call fcn.140148440
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.140187470
test r14, r14
mov r13, qword [rsp + 0x38]
je 0x1400477bd
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b1830.0]
movzx r12d, word [rax + 6]
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b1830.0]
mov rsi, rax
test r12w, r12w
je 0x140047b47
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b1830.0]
movzx eax, word [rax + 4]
add rsi, rax
mov rcx, rsi
mov rdx, r15
mov r8, r14
call fcn.14014b810
test rbp, rbp
je 0x140047b1c
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b1830.0]
cmp word [rax + 4], 0x10
je 0x140047821
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b1830.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.0x1401b1830.0]
movzx r8d, word [rax + 4]
add r8, 0xfffffffffffffff0
cmp r8, 8
jne 0x140047b50
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.0x1401b1830.0]
mov word [rax + 8], si
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x140047b3d
lea rax, [rax*8]
lea r14, [rax + rax*4]
mov rcx, r14
call fcn.140148440
mov r12, rax
lea rbx, [rax + r14]
xor esi, esi
mov rcx, r12
add rcx, rsi
je 0x140047a7d
call fcn.140051730
add rsi, 0x28
cmp r14, rsi
jne 0x140047868
cmp word [rsp + 0x28], 0
je 0x14004791b
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.140051c10
test al, al
jne 0x140047ad5
mov r8, qword [rsp + 0x130]
test r8, r8
je 0x1400479c6
mov r15, r13
lea r13, [rsp + 0x70]
mov rcx, r13
mov rdx, rsi
call fcn.140051c20
lea rsi, [rsp + 0x98]
mov rcx, rsi
mov rdx, r13
call fcn.140051760
cmp rbp, qword [rsp + 0x28]
jae 0x140047aa9
mov rcx, rbx
mov rdx, rsi
call fcn.140051880
mov rcx, rsi
call fcn.1400f1510
mov r13, r15
inc rbp
add rbx, 0x28
cmp qword [rsp + 0x28], rbp
jne 0x140047898
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.0x1401b1830.0]
mov qword [r13], rdi
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140148f60
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.140148440
mov rdi, rax
lea rax, fcn.1400ecc50
mov qword [rdi], rax
lea rcx, [rdi + 0x14]
mov r8d, 0xec
mov qword [rsp + 0x40], rcx
xor edx, edx
call fcn.14014bec0
mov qword [rdi + 8], rsi
mov dword [rdi + 0x10], esi
movzx eax, word [rsp + 0x30]
mov word [rdi + 0x16], ax
test ax, ax
je 0x1400479b8
lea rax, [r13*8 + 8]
mov rcx, qword [rsp + 0x40]
mov word [rcx], ax
test rdi, rdi
jne 0x14004775c
jmp 0x140047734
mov qword [rsp + 0x80], 0
test esi, esi
je 0x140047a10
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r15d, eax
mov rax, qword [rsp + 0x80]
inc rax
cmp rax, 2
jae 0x140047a5a
lea rax, [rsi + 1]
cmp rax, 2
jb 0x140047a07
mov qword [rsp + 0x80], rsi
call fcn.1400fc5f0
mov ecx, r15d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r15, [rsp + 0x88]
mov rcx, r15
lea rdx, [rsp + 0x80]
call fcn.1400b54b0
lea rsi, [rsp + 0x98]
mov rcx, rsi
mov rdx, r15
call fcn.140051760
cmp rbp, qword [rsp + 0x28]
jae 0x140047aa9
mov rcx, rbx
mov rdx, rsi
call fcn.140051880
mov rcx, rsi
call fcn.1400f1510
jmp 0x140047908
call fcn.1400fc5f0
mov rcx, qword [rsp + 0x80]
call fcn.14010ef00
mov qword [rsp + 0x80], 0
jmp 0x1400479f0
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.140186340
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.140186340
mov qword [r13], 0
test r12, r12
jne 0x140047b72
test rdi, rdi
mov r13, qword [rsp + 0x38]
je 0x14004793f
mov rax, qword [rdi]
mov rax, qword [rax]
mov rcx, rdi
mov edx, 1
call qword [case.0x1401b1830.0]
jmp 0x14004793f
add r14, 0xfffffffffffffff8
lea r15, [rbx + 8]
xor eax, eax
jmp 0x14004769b
mov rax, qword [rsp + 0x48]
movzx esi, word [rax]
mov rax, qword [rdi]
mov rax, qword [rax + 0x18]
mov rcx, rdi
call qword [case.0x1401b1830.0]
mov word [rax + 4], si
jmp 0x14004783d
xor ebx, ebx
xor r12d, r12d
jmp 0x14004791b
add rsi, 8
jmp 0x1400477af
mov rcx, rsi
mov rdx, rbx
call fcn.14014b810
jmp 0x140047821
mov r13, qword [rsp + 0x38]
mov qword [r13], 0
jmp 0x14004793f
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.1400f1510
add rsi, 0xffffffffffffffd8
add r14, 0x28
jne 0x140047b86
mov rcx, r12
call fcn.14014847c
jmp 0x140047ae6