Function at 0x1400051d7
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
sub rsp, 0x3c0
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x150], rsi
mov qword [rbp + 0x148], rbx
mov qword [rbp + 0x28], rcx
mov qword [rbp + 0x30], rdx
mov qword [rbp + 0x38], r8
mov qword [rbp + 0x390], rcx
mov qword [rbp + 0x398], rdx
mov dword [rbp + 0x3a0], r8d
mov rax, qword [0x1400e0a40]
xor rax, rbp
mov qword [rbp + 0x378], rax
mov qword [rbp + 0x40], 0
mov dword [rbp], 0
mov dword [rbp + 4], 0
lea rax, [rbp + 0x158]
mov edx, 0
mov ecx, 0x10e
mov qword [rbp + 0xf8], rcx
mov rcx, rax
mov rax, qword [rbp + 0xf8]
mov r8, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x48], rax
lea rax, [rbp + 0x266]
mov edx, 0
mov ecx, 0x10e
mov qword [rbp + 0x100], rcx
mov rcx, rax
mov rax, qword [rbp + 0x100]
mov r8, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x50], rax
mov rax, qword [rbp + 0x398]
test rax, rax
je 0x140005717
mov rax, qword [rbp + 0x398]
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov qword [rbp + 0x58], rax
mov eax, dword [rbp + 0x58]
mov dword [rbp + 0x10], eax
mov eax, dword [rbp + 0x10]
mov dword [rbp], eax
mov eax, dword [rbp + 0x10]
test eax, eax
je 0x140005717
mov eax, dword [rbp]
mov edx, dword [rbp + 4]
cmp eax, edx
jle 0x140005325
mov eax, dword [rbp + 4]
neg eax
add eax, dword [rbp]
dec eax
movsxd rax, eax
add rax, qword [rbp + 0x398]
movzx eax, byte [rax]
movzx eax, al
cmp eax, 0x5c
je 0x140005318
mov eax, dword [rbp + 4]
neg eax
add eax, dword [rbp]
dec eax
movsxd rax, eax
add rax, qword [rbp + 0x398]
movzx eax, byte [rax]
movzx eax, al
cmp eax, 0x2f
jne 0x140005325
mov eax, 1
add eax, dword [rbp + 4]
mov dword [rbp + 4], eax
jmp 0x1400052d0
lea rax, [rbp + 0x266]
mov rdx, qword [rbp + 0x398]
mov ecx, dword [rbp + 4]
neg ecx
add ecx, dword [rbp]
movsxd rcx, ecx
mov rbx, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov qword [rbp + 0x108], rcx
mov rcx, rax
mov rax, qword [rbp + 0x108]
mov r8, rax
call rbx
mov qword [rbp + 0x60], rax
mov eax, dword [rbp + 0x3a0]
test eax, eax
jne 0x140005372
mov dword [rbp + 0x14], 0
jmp 0x140005379
mov dword [rbp + 0x14], 0x40000000
lea rax, [rbp + 0x266]
mov edx, dword [rbp + 0x14]
mov ecx, 1
mov ebx, 0
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0x2000080
mov qword [rsp + 0x30], 0
mov rsi, qword [sym.imp.orauts.dll_CreateFileA]
mov dword [rbp + 0x110], ecx
mov rcx, rax
mov eax, dword [rbp + 0x110]
mov r8d, eax
mov r9, rbx
call rsi
mov qword [rbp + 0x68], rax
mov eax, dword [rbp + 0x68]
mov dword [rbp + 0x18], eax
mov eax, dword [rbp + 0x18]
mov dword [rbp + 8], eax
mov eax, dword [rbp + 0x18]
cmp eax, 0xffffffff
je 0x1400054cf
lea rax, [rbp + 0x266]
mov rdx, qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov rcx, rax
call rdx
mov dword [rbp + 0x1c], eax
mov eax, dword [rbp + 0x1c]
mov dword [rbp + 0x20], eax
mov eax, dword [rbp + 0x20]
cmp eax, 0xffffffff
je 0x1400054cf
mov eax, dword [rbp + 0x20]
test al, 0x10
je 0x1400054cf
mov eax, 0x10e
mov rdx, qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, rax
call rdx
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0x80]
mov qword [rbp + 0x40], rax
mov rax, qword [rbp + 0x40]
mov edx, 0
mov ecx, 0x10e
mov qword [rbp + 0x118], rcx
mov rcx, rax
mov rax, qword [rbp + 0x118]
mov r8, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x90], rax
lea rax, [rbp + 0x266]
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov qword [rbp + 0xa0], rax
mov rax, qword [rbp + 0x40]
lea rdx, [rbp + 0x266]
mov rcx, qword [rbp + 0xa0]
mov rbx, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov qword [rbp + 0x120], rcx
mov rcx, rax
mov rax, qword [rbp + 0x120]
mov r8, rax
call rbx
mov qword [rbp + 0xb0], rax
mov rax, qword [rbp + 0x40]
lea rdx, [0x1400afa14]
mov rcx, rax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
mov qword [rbp + 0xc8], rax
jmp 0x140005717
mov eax, dword [rbp + 8]
test eax, eax
je 0x1400054eb
mov eax, dword [rbp + 8]
movsxd rax, eax
mov rdx, qword [sym.imp.orauts.dll_CloseHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0x24], eax
lea rax, [rbp + 0x266]
mov edx, 0x5c
mov rcx, rax
call sub.VCRUNTIME140.dll_strrchr
mov qword [rbp + 0x70], rax
mov rax, qword [rbp + 0x70]
mov qword [rbp + 0x78], rax
mov rax, qword [rbp + 0x78]
test rax, rax
je 0x1400055fe
lea rax, [rbp + 0x266]
neg rax
add rax, qword [rbp + 0x78]
je 0x14000553f
lea rax, [rbp + 0x266]
neg rax
add rax, qword [rbp + 0x78]
mov qword [rbp + 0x98], rax
jmp 0x14000554a
mov qword [rbp + 0x98], 1
lea rax, [rbp + 0x158]
lea rdx, [rbp + 0x266]
mov rcx, qword [rbp + 0x98]
mov rbx, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov qword [rbp + 0x128], rcx
mov rcx, rax
mov rax, qword [rbp + 0x128]
mov r8, rax
call rbx
mov qword [rbp + 0xa8], rax
mov rax, qword [rbp + 0x390]
lea rdx, [rbp + 0x158]
mov ecx, dword [rbp + 0x3a0]
mov dword [rbp + 0x130], ecx
mov rcx, rax
mov eax, dword [rbp + 0x130]
mov r8d, eax
call fcn.1400051d7
mov qword [rbp + 0xb8], rax
mov rax, qword [rbp + 0xb8]
mov qword [rbp + 0xe0], rax
mov rax, qword [rbp + 0x378]
mov qword [rbp + 0x378], 0
xor rax, rbp
mov rcx, rax
call fcn.1400aab50
mov rax, qword [rbp + 0xe0]
mov rbx, qword [rbp + 0x148]
mov rsi, qword [rbp + 0x150]
lea rsp, [rbp + 0x380]
pop rbp
ret
lea rax, [rbp + 0x266]
mov edx, 0x2f
mov rcx, rax
call sub.VCRUNTIME140.dll_strrchr
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0x88]
mov qword [rbp + 0x78], rax
mov rax, qword [rbp + 0x78]
test rax, rax
je 0x140005717
lea rax, [rbp + 0x266]
neg rax
add rax, qword [rbp + 0x78]
je 0x140005658
lea rax, [rbp + 0x266]
neg rax
add rax, qword [rbp + 0x78]
mov qword [rbp + 0xc0], rax
jmp 0x140005663
mov qword [rbp + 0xc0], 1
lea rax, [rbp + 0x158]
lea rdx, [rbp + 0x266]
mov rcx, qword [rbp + 0xc0]
mov rbx, qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov qword [rbp + 0x138], rcx
mov rcx, rax
mov rax, qword [rbp + 0x138]
mov r8, rax
call rbx
mov qword [rbp + 0xd0], rax
mov rax, qword [rbp + 0x390]
lea rdx, [rbp + 0x158]
mov ecx, dword [rbp + 0x3a0]
mov dword [rbp + 0x140], ecx
mov rcx, rax
mov eax, dword [rbp + 0x140]
mov r8d, eax
call fcn.1400051d7
mov qword [rbp + 0xd8], rax
mov rax, qword [rbp + 0xd8]
mov qword [rbp + 0xe8], rax
mov rax, qword [rbp + 0x378]
mov qword [rbp + 0x378], 0
xor rax, rbp
mov rcx, rax
call fcn.1400aab50
mov rax, qword [rbp + 0xe8]
mov rbx, qword [rbp + 0x148]
mov rsi, qword [rbp + 0x150]
lea rsp, [rbp + 0x380]
pop rbp
ret
mov eax, dword [rbp + 8]
test eax, eax
je 0x140005733
mov eax, dword [rbp + 8]
movsxd rax, eax
mov rdx, qword [sym.imp.orauts.dll_CloseHandle]
mov rcx, rax
call rdx
mov dword [rbp + 0xc], eax
mov rax, qword [rbp + 0x40]
mov qword [rbp + 0xf0], rax
mov rax, qword [rbp + 0x378]
mov qword [rbp + 0x378], 0
xor rax, rbp
mov rcx, rax
call fcn.1400aab50
mov rax, qword [rbp + 0xf0]
mov rbx, qword [rbp + 0x148]
mov rsi, qword [rbp + 0x150]
lea rsp, [rbp + 0x380]
pop rbp
ret