Function at 0x1400a5060
Capabilities:
Check if file exists
Get file attributes
Read file on windows
Set file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xd0
mov rax, qword [0x140672360]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov rbx, rdx
mov rdi, rcx
mov qword [rbp - 0x31], rcx
xor r15d, r15d
mov dword [rbp - 0x59], r15d
mov qword [rcx], r15
mov qword [rcx + 0x10], r15
mov qword [rcx + 0x18], 0xf
mov byte [rcx], r15b
mov dword [rbp - 0x59], 1
mov rcx, rdx
cmp qword [rdx + 0x18], 8
jb 0x1400a50bd
mov rcx, qword [rdx]
call fcn.1401d4f70
test al, al
jne 0x1400a50d6
mov rcx, rbx
call fcn.1400a4df0
test al, al
je 0x1400a52f0
xor r14b, r14b
xor r9d, r9d
lea r8, [rbp - 0x29]
lea edx, [r9 + 1]
lea rcx, str.D:_A_OICI_FA___SY__A_OICI_FA___BA_
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
cmp eax, 1
jne 0x1400a51a0
mov rsi, qword [rbp - 0x29]
test rsi, rsi
je 0x1400a51a0
lea r9, [rbp - 0x21]
lea r8, [rbp - 0x19]
lea rdx, [rbp - 9]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x1400a515e
mov rax, qword [rbp - 0x19]
test rax, rax
je 0x1400a515e
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400a5136
mov rcx, qword [rbx]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea edx, [r9 + 1]
mov r8d, 0x80000004
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
sete r14b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r14b, r14b
je 0x1400a51a0
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400a5179
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400a51a0
test al, 1
je 0x1400a51a0
xor eax, 1
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x1400a5198
mov rcx, qword [rbx]
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 1], xmm0
movups xmmword [rbp + 0xf], xmm0
mov dword [rbp + 0x1f], eax
mov byte [rbp + 0x23], al
movups xmmword [rbp - 0x19], xmm0
cmp qword [rbx + 0x18], 8
jb 0x1400a51c1
mov rbx, qword [rbx]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
lea rax, vtable.TAutoHandle_void____ptr64__struct_FileHandleTraits_.0
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rbx
cmp rbx, 0xffffffffffffffff
je 0x1400a5239
mov dword [rbp - 0x21], r15d
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x21]
mov r8d, 0x24
lea rdx, [rbp - 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400a522a
cmp dword [rbp - 0x21], 0x24
je 0x1400a5253
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Failed_to_read_safestore_password_file_with_error__lu
jmp 0x1400a5246
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Failed_to_create_safestore_password_file_with_error__lu
mov r8d, eax
mov ecx, 3
call fcn.140109e80
mov qword [rbp - 0x51], r15
mov qword [rbp - 0x41], r15
mov qword [rbp - 0x39], 0xf
lea rax, [rbp - 1]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], 0
jne 0x1400a5270
lea rdx, [rbp - 1]
lea rcx, [rbp - 0x51]
call fcn.140073120
nop
cmp rbx, 0xffffffffffffffff
je 0x1400a5297
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rbp - 0x51]
cmp rdi, rax
je 0x1400a52b9
mov rcx, rdi
call fcn.140073500
movups xmm0, xmmword [rbp - 0x51]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rbp - 0x41]
movups xmmword [rdi + 0x10], xmm1
jmp 0x1400a52f0
mov rdx, qword [rbp - 0x39]
cmp rdx, 0x10
jb 0x1400a52f0
inc rdx
mov rcx, qword [rbp - 0x51]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400a52eb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400a5316
call fcn.140359090
mov rax, rdi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140359070
mov rbx, qword [rsp + 0x110]
add rsp, 0xd0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
call fcn.140368068
int3