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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x248
mov r13, r8
mov rsi, rcx
mov rax, qword [0x140180518]
xor rax, rsp
mov qword [rsp + 0x240], rax
lea rdi, [rsp + 0x1c0]
mov qword [rsp + 0x1a8], rdi
mov qword [rsp + 0x1b0], 0
mov qword [rsp + 0x1b8], 0x80
lea r12, [rsp + 0xa8]
mov qword [rsp + 0x90], r12
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa0], 0x80
cmp byte [rdx + 0x21], 1
mov byte [rsp + 0x47], r9b
jne case.0x140057b3f.2
movzx eax, byte [rdx + 0x20]
dec eax
cmp eax, 4
ja case.0x140057b3f.2
lea rcx, [0x140057e6c]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
mov r14, qword [rdx]
test r14, r14
je case.0x140057b3f.1
mov rcx, r14
call fcn.140122e90
mov r15, rax
jmp 0x140057b79
lea rax, [rsp + 0x1a8]
mov rcx, rdx
mov rdx, rax
call fcn.140020b00
mov r14, qword [rsp + 0x1a8]
mov r15, qword [rsp + 0x1b0]
mov qword [rsp + 0x80], r14
mov qword [rsp + 0x88], r15
cmp r15, 4
jb 0x140057bae
cmp dword [r14], 0x5c2e5c5c
jne 0x140057bae
jmp 0x140057c47
xorps xmm0, xmm0
movaps xmmword [rsp + 0x80], xmm0
xor r14d, r14d
xor r15d, r15d
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x50], rsi
mov sil, 1
lea rbx, [0x140127160]
xor edi, edi
lea r12, [rsp + 0x80]
lea r13, [rsp + 0x58]
jmp 0x140057bf9
cmp rdi, 0x15
lea rax, [rdi + 1]
setb sil
add rbx, 8
mov rdi, rax
cmp rax, 0x16
je 0x140057c27
mov rbp, qword [rbx]
mov rcx, rbp
call fcn.140122e90
cmp qword [rsp + 0x88], rax
jne 0x140057be0
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], rax
mov rcx, r12
mov rdx, r13
call fcn.14001ea90
test eax, eax
jne 0x140057be0
test sil, 1
mov rsi, qword [rsp + 0x50]
lea rdi, [rsp + 0x1c0]
lea r12, [rsp + 0xa8]
mov r13, qword [rsp + 0x48]
je 0x140057ca5
xorps xmm0, xmm0
movups xmmword [r13], xmm0
mov qword [r13 + 0x10], 0
movabs rax, 0xffff00000006
mov qword [r13 + 0x18], rax
movups xmmword [r13 + 0x20], xmm0
mov dword [rsi], 0
mov eax, dword [0x1401bc758]
mov ecx, dword [0x1401bd448]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140057e35
lea rax, section..data
mov qword [rsi + 8], rax
jmp 0x140057de8
mov word [rsp + 0x78], 0x105
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], r15
lea rdx, [rsp + 0x58]
lea r8, [rsp + 0x90]
mov r9d, 0x104
mov rcx, rsi
call fcn.14005a040
cmp dword [rsi], 0
jne 0x140057de8
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140057d81
shr eax, 0xa
and eax, 1
movzx ecx, byte [rsp + 0x47]
not cl
and cl, al
movzx eax, cl
or eax, 0x10
shl eax, 0x15
mov rcx, qword [rsp + 0x90]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], 3
xor edx, edx
mov r8d, 7
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140057d81
mov rbx, rax
mov rcx, rsi
mov rdx, rax
mov r8, r13
call fcn.14005b1e0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140057de8
mov rax, qword [rdx]
cmp qword [rax + 0x18], 0x10
mov r14, rax
jb 0x140057d6c
mov r14, qword [rax]
mov r15, qword [rax + 0x10]
jmp 0x140057b79
mov r14, qword [rdx]
mov r15, qword [rdx + 8]
jmp 0x140057b79
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
and ecx, 0xfffffffe
xorps xmm0, xmm0
cmp ecx, 2
jne 0x140057dab
movups xmmword [r13], xmm0
mov qword [r13 + 0x10], 0
mov dword [r13 + 0x18], 1
jmp 0x140057dd1
cmp eax, 0x20
jne 0x140057dc7
movups xmmword [r13], xmm0
mov qword [r13 + 0x10], 0
mov dword [r13 + 0x18], 9
jmp 0x140057dd1
movups xmmword [r13 + 0xc], xmm0
movups xmmword [r13], xmm0
mov dword [r13 + 0x1c], 0xffff
movups xmmword [r13 + 0x20], xmm0
mov rcx, rsi
mov edx, eax
call fcn.1400660f0
mov rcx, qword [rsp + 0x90]
cmp rcx, r12
je 0x140057dfb
call qword [0x14017cb20]
mov rcx, qword [rsp + 0x1a8]
cmp rcx, rdi
je 0x140057e0e
call qword [0x14017cb20]
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.1401213e0
mov rax, rsi
add rsp, 0x248
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [0x1401bc758]
call fcn.140121230
cmp dword [0x1401bc758], 0xffffffff
jne 0x140057c95
lea rcx, [fcn.1400055a0]
call fcn.140121400
lea rcx, [0x1401bc758]
call fcn.140121298
jmp 0x140057c95