Function at 0x140058a50
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 r14, rcx
mov rax, qword [0x140362028]
xor rax, rsp
mov qword [rsp + 0xc0], rax
cmp r8, 7
jbe 0x140058b0e
mov rdi, r8
mov rbx, rdx
mov eax, dword [rdx]
cmp rax, r8
jne 0x140058b0e
movzx r13d, word [rbx + 6]
xor r12d, r12d
test r13w, r13w
cmovne r12, rbx
test r12, r12
je 0x140058ac8
movzx r15d, word [r12 + 4]
cmp r15d, 0x10
jb 0x140058b0e
cmp dword [r12], r15d
jb 0x140058b0e
test r15b, 7
jne 0x140058b0e
lea rax, [r15 - 0x10]
sub rdi, r15
add r15, rbx
jmp 0x140058ad2
add rdi, 0xfffffffffffffff8
lea r15, [rbx + 8]
xor eax, eax
lea rdx, [r12 + 8]
lea rbp, [rbx + 4]
test r12, r12
mov rcx, rdx
cmove rcx, rbp
cmp rax, 0x103
ja 0x140058b0e
mov rsi, rax
shr rsi, 2
movzx ecx, word [rcx]
mov qword [rsp + 0x40], rcx
cmp ecx, esi
ja 0x140058b0e
cmp r9d, 1
jne 0x140058b3c
cmp word [rsp + 0x40], 0
je 0x140058b3c
mov qword [r14], 0
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1401a4270
mov rax, r14
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x30], rbp
mov qword [rsp + 0x38], rdx
mov cl, byte [0x14036ed48]
cmp rax, 3
ja 0x140058bf1
lea rax, [rdi + 0x10]
cmp rax, 0xf0
ja 0x140058bf1
and cl, 1
je 0x140058bf1
xor eax, eax
test r13w, r13w
setne al
lea rbp, [rdi + rax*8]
add rbp, 8
cmp rbp, 0xf0
ja 0x140058bf1
mov qword [rsp + 0x50], rax
mov ecx, 0x100
call fcn.1401a2e6c
mov qword [rsp + 0x28], rax
lea rcx, fcn.14005a430
mov qword [rax], rcx
lea rcx, [rax + 0x14]
mov r8d, 0xec
mov qword [rsp + 0x48], rcx
xor edx, edx
call fcn.1401a64a0
mov rax, qword [rsp + 0x28]
mov qword [rax + 8], rbp
mov dword [rax + 0x10], ebp
mov rbp, rax
mov word [rax + 0x16], r13w
test r13w, r13w
je 0x140058bec
mov rax, qword [rsp + 0x50]
lea rax, [rax*8 + 8]
mov rcx, qword [rsp + 0x48]
mov word [rcx], ax
test rbp, rbp
jne 0x140058c15
mov ecx, 0x48
call fcn.1401a2e6c
mov word [rsp + 0x20], r13w
mov rbp, rax
mov rcx, rax
mov rdx, rdi
mov r8, rdi
mov r9, rsi
call fcn.1400588b0
test rdi, rdi
mov qword [rsp + 0x28], rbp
je 0x140058c80
mov rax, qword [rbp]
mov rax, qword [rax + 0x18]
mov rcx, rbp
call qword [case.0x1401f58d0.0]
movzx r13d, word [rax + 6]
mov rax, qword [rbp]
mov rax, qword [rax + 0x18]
mov rcx, rbp
call qword [case.0x1401f58d0.0]
mov rcx, rbp
mov rbp, rax
test r13w, r13w
je 0x140058c65
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x1401f58d0.0]
movzx eax, word [rax + 4]
jmp 0x140058c6a
mov eax, 8
add rbp, rax
mov rcx, rbp
mov rdx, r15
mov r8, rdi
call fcn.1401a6090
mov rbp, qword [rsp + 0x28]
test r12, r12
je 0x140058cec
mov rax, qword [rbp]
mov rax, qword [rax + 0x18]
mov rcx, rbp
call qword [case.0x1401f58d0.0]
mov esi, 8
cmp word [rax + 4], 0x10
je 0x140058ce0
mov rax, qword [rbp]
mov rax, qword [rax + 0x18]
mov rcx, rbp
call qword [case.0x1401f58d0.0]
lea rdi, [rax + 0x10]
add rbx, 0x10
mov rax, qword [rbp]
mov rax, qword [rax + 0x18]
mov rcx, rbp
call qword [case.0x1401f58d0.0]
movzx r8d, word [rax + 4]
add r8, 0xfffffffffffffff0
mov rcx, rdi
mov rdx, rbx
call fcn.1401a6090
mov rbx, qword [rsp + 0x40]
mov rax, qword [rsp + 0x38]
jmp 0x140058cfb
mov esi, 4
mov rax, qword [rsp + 0x30]
mov rbx, qword [rsp + 0x40]
movzx edi, word [rax]
mov rcx, qword [rsp + 0x28]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x1401f58d0.0]
mov word [rax + rsi], di
test rbx, rbx
je 0x140058d5a
lea rax, [rbx*8]
lea rdi, [rax + rax*4]
mov rcx, rdi
call fcn.1401a2e6c
mov r15, rax
test rdi, rdi
je 0x140058d6a
lea r12, [r15 + rdi]
mov rbp, r15
mov rcx, rbp
call fcn.140075650
add rbp, 0x28
add rdi, 0xffffffffffffffd8
jne 0x140058d3c
test bx, bx
je 0x140058d60
mov qword [rsp + 0x30], r12
jmp 0x140058d6f
xor r12d, r12d
xor r15d, r15d
mov rsi, qword [rsp + 0x28]
jmp 0x140058ea7
mov qword [rsp + 0x30], r15
mov rsi, qword [rsp + 0x28]
xor edi, edi
mov qword [rsp + 0x38], r15
mov rax, qword [rsi + 0x40]
movsxd r12, dword [rax + rdi*4]
mov rcx, r12
call fcn.140075bc0
test al, al
jne 0x140058ecf
mov r8, qword [rsp + 0x130]
test r8, r8
je 0x140058ddb
lea r13, [rsp + 0x70]
mov rcx, r13
mov rdx, r12
call fcn.140075bd0
lea rbp, [rsp + 0x98]
mov rcx, rbp
mov rdx, r13
call fcn.140075680
mov rcx, r15
mov rdx, rbp
call fcn.1400757a0
mov rcx, rbp
call fcn.140075860
jmp 0x140058e8d
mov qword [rsp + 0x80], 0
test r12d, r12d
je 0x140058e4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, eax
mov rax, qword [rsp + 0x80]
inc rax
cmp rax, 2
jb 0x140058e24
call fcn.1400c5840
mov rcx, qword [rsp + 0x80]
call fcn.1400e21b0
mov qword [rsp + 0x80], 0
lea rax, [r12 + 1]
cmp rax, 2
jb 0x140058e3c
mov qword [rsp + 0x80], r12
call fcn.1400c5840
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x40]
lea r12, [rsp + 0x88]
mov rcx, r12
lea rdx, [rsp + 0x80]
call fcn.1400fbf40
lea rbp, [rsp + 0x98]
mov rcx, rbp
mov rdx, r12
call fcn.140075680
mov rcx, r15
mov rdx, rbp
call fcn.1400757a0
mov rcx, rbp
call fcn.140075860
mov rsi, qword [rsp + 0x28]
inc rdi
add r15, 0x28
cmp rbx, rdi
jne 0x140058d7b
mov r15, qword [rsp + 0x38]
mov r12, qword [rsp + 0x30]
lea rdx, [rsp + 0x58]
mov qword [rdx], r15
mov qword [rdx + 8], r12
mov qword [rdx + 0x10], r12
mov rax, qword [rsi]
mov rax, qword [rax + 0x28]
mov rcx, rsi
call qword [case.0x1401f58d0.0]
mov qword [r14], rsi
jmp 0x140058b15
mov qword [r14], 0
mov rdi, qword [rsp + 0x38]
test rdi, rdi
je 0x140058f00
mov rbx, qword [rsp + 0x30]
cmp rbx, rdi
je 0x140058ef8
add rbx, 0xffffffffffffffd8
mov rcx, rbx
call fcn.140075860
jmp 0x140058ee5
mov rcx, rdi
call fcn.1401a2ea8
test rsi, rsi
je 0x140058b15
mov rax, qword [rsi]
mov rax, qword [rax]
mov rcx, rsi
mov edx, 1
call qword [case.0x1401f58d0.0]
jmp 0x140058b15