Function at 0x1401ad1bc
Capabilities:
Check if file exists
Get file attributes
Move file
Set file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
xor ebx, ebx
mov r12, r9
and qword [rbp + 0x40], rbx
mov r13d, r8d
and dword [rcx], ebx
mov rdi, rdx
mov qword [rbp + 0x48], rbx
mov r14, rcx
test rdx, rdx
je 0x1401ad263
lea rdx, [rbp + 0x48]
mov rcx, rdi
call fcn.1400781e4
mov esi, eax
test eax, eax
jns 0x1401ad212
mov ecx, eax
call fcn.140078308
mov rbx, qword [rbp + 0x48]
jmp 0x1401ad4a2
mov rbx, qword [rbp + 0x48]
lea r8, str..bak
mov rdx, rbx
lea rcx, [rbp + 0x40]
call fcn.1401af868
mov esi, eax
test eax, eax
jns 0x1401ad23b
mov ecx, eax
call fcn.140078308
jmp 0x1401ad4a2
mov r15, qword [rbp + 0x40]
test r12, r12
je 0x1401ad257
mov rax, qword [r12]
mov qword [r14 + 0x28], rax
mov rax, qword [r12 + 8]
mov qword [r14 + 0x30], rax
jmp 0x1401ad26b
and qword [r14 + 0x28], 0
and qword [r14 + 0x30], 0
jmp 0x1401ad26b
mov rdi, qword [rcx + 0x10]
mov r15, qword [rcx + 0x18]
test r13d, r13d
je 0x1401ad280
mov rdx, rdi
call fcn.1401a7734
mov rdx, r15
call fcn.1401a7734
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or r12d, 0xffffffff
cmp eax, r12d
jne 0x1401ad2c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x1401ad2fa
test eax, eax
jne 0x1401ad2a8
mov esi, 0x80004005
jmp 0x1401ad2be
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
test esi, esi
jns 0x1401ad4cb
mov ecx, esi
jmp 0x1401ad231
mov rdx, rdi
call fcn.1401a7734
xor r8d, r8d
mov rdx, rdi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1401ad2fa
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1401ad2a1
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
jmp 0x1401ad2be
mov r9, rdi
mov edx, 0x80000000
mov r8d, 3
mov rcx, r14
call fcn.1401ae3f8
mov esi, eax
test eax, eax
jns 0x1401ad31d
mov ecx, eax
call fcn.140078308
mov ecx, esi
call fcn.140078324
cmp esi, 0x80070002
jne 0x1401ad426
xor esi, esi
xor r9d, r9d
and qword [rsp + 0x30], rsi
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x80
mov rcx, r15
lea r8d, [rsi + 1]
mov dword [rsp + 0x20], r8d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13d, 0x2000
lea rcx, [rax + 1]
test rcx, 0xfffffffffffffffe
jne 0x1401ad399
or qword [rbp + 0x48], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1401ad382
mov esi, 0x80004005
jmp 0x1401ad390
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
mov ecx, esi
call fcn.140078308
jmp 0x1401ad3b9
mov rcx, r15
mov qword [rbp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, r12d
je 0x1401ad3b9
or eax, r13d
mov rcx, r15
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, esi
call fcn.140078324
lea rcx, [rbp + 0x48]
call fcn.140074d74
test esi, esi
js 0x1401ad2be
mov r9, rdi
mov edx, 0xc0000000
mov r8d, 4
mov rcx, r14
call fcn.1401ae3f8
mov esi, eax
test eax, eax
jns 0x1401ad3f4
mov ecx, eax
call fcn.140078308
mov ecx, esi
call fcn.140078324
test esi, esi
js 0x1401ad2be
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, r12d
je 0x1401ad41f
or eax, r13d
mov rcx, rdi
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
and dword [r14 + 0x20], 0
jmp 0x1401ad436
test esi, esi
js 0x1401ad2be
mov dword [r14 + 0x20], 1
test rbx, rbx
je 0x1401ad4a2
mov rdi, qword [r14 + 0x10]
mov r15, rbx
xor ebx, ebx
test rdi, rdi
je 0x1401ad469
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [rdi - 4]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor ecx, ecx
call fcn.140078324
and qword [r14 + 0x10], rbx
mov qword [r14 + 0x10], r15
mov r15, qword [rbp + 0x40]
and qword [rbp + 0x40], rbx
mov rdi, qword [r14 + 0x18]
test rdi, rdi
je 0x1401ad49e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [rdi - 4]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor ecx, ecx
call fcn.140078324
and qword [r14 + 0x18], rbx
mov qword [r14 + 0x18], r15
test esi, esi
jns 0x1401ad4cb
cmp dword [0x14042299c], 0
jne 0x1401ad4cb
xor r9d, r9d
mov r8d, esi
mov rcx, r14
lea edx, [r9 + 3]
call fcn.1401a77ac
mov dword [0x14042299c], 1
mov ecx, esi
call fcn.140078324
mov rax, qword [rbp + 0x40]
test rax, rax
je 0x1401ad4ff
lea rdi, [rax - 4]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor ecx, ecx
call fcn.140078324
and qword [rbp + 0x40], 0
test rbx, rbx
je 0x1401ad520
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r8, [rbx - 4]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor ecx, ecx
call fcn.140078324
mov eax, esi
mov rbx, qword [rsp + 0x90]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret