Function at 0x1400a0450
Capabilities:
Check if file exists
Copy file
Create process on windows
Delete file
Get system information on windows
Move file
Set file attributes

Disassembly:
push rbp
push rdi
push r14
push r15
lea rbp, [rsp - 0x648]
sub rsp, 0x748
mov rax, qword [0x1403a8088]
xor rax, rsp
mov qword [rbp + 0x630], rax
mov rax, rdx
mov r15, rcx
xor edi, edi
lea rdx, str.CLEANUPSYS
mov rcx, rax
mov dword [rsp + 0x50], edi
call fcn.140061bf0
mov r14, rax
test rax, rax
je 0x1400a0650
mov qword [rsp + 0x780], rbx
lea rdx, [0x140324834]
mov rcx, rax
mov qword [rsp + 0x740], rsi
mov ebx, edi
call fcn.140061bf0
test rax, rax
je 0x1400a04d5
mov rax, qword [rax + 0x28]
test rax, rax
je 0x1400a04d5
mov rbx, qword [rax + 0x38]
add rbx, 0x10
lea rdx, str.DOWNLOAD
mov rcx, r14
mov rsi, rdi
call fcn.140061bf0
test rax, rax
je 0x1400a04fd
mov rax, qword [rax + 0x28]
test rax, rax
je 0x1400a04fd
mov rsi, qword [rax + 0x38]
add rsi, 0x10
test rbx, rbx
je 0x1400a0640
test rsi, rsi
je 0x1400a0640
mov r8d, 0x104
lea rdx, [rbp]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, [0x140324844]
call fcn.140057190
mov ebx, dword [rsp + 0x50]
lea rcx, [rbp]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1400a0571
lea rcx, [rbp]
call fcn.140055f50
cmp ebx, eax
je 0x1400a07dc
mov edx, 0x80
lea rcx, [rbp]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rbp]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea r9, [rbp]
mov edx, 0x104
lea r8, str._sdown
lea rcx, [rbp + 0x210]
call fcn.14004ebd0
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [0x14045d5d8], rdi
jne 0x1400a05dc
mov ecx, 1
call fcn.14012a618
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x58], rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [rbp - 0x80]
mov ecx, 0x40
add eax, eax
mov qword [0x14045d5d8], rbx
cmp eax, ecx
cmovae eax, ecx
mov dword [0x14045d5a4], eax
lea r8, [rbp + 0x210]
mov rdx, rsi
call fcn.14005cd20
test eax, eax
je 0x1400a0640
mov ebx, dword [rsp + 0x50]
lea rcx, [rbp + 0x210]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1400a0633
lea rcx, [rbp + 0x210]
call fcn.140055f50
cmp ebx, eax
je 0x1400a066f
mov edx, 0x80
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rbx, qword [rsp + 0x780]
mov rsi, qword [rsp + 0x740]
mov eax, edi
mov rcx, qword [rbp + 0x630]
xor rcx, rsp
call fcn.14012a2b0
add rsp, 0x748
pop r15
pop r14
pop rdi
pop rbp
ret
lea r9, [rbp]
mov edx, 0x104
lea r8, str._sbak
lea rcx, [rbp + 0x420]
call fcn.14004ebd0
lea rcx, [rbp + 0x420]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r8d, ntohs
lea rdx, [rbp + 0x420]
lea rcx, [rbp]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1400a06cf
xor r8d, r8d
lea rdx, [rbp + 0x420]
lea rcx, [rbp]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x1400a0640
mov r8d, ntohs
lea rdx, [rbp]
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1400a0706
xor r8d, r8d
lea rdx, [rbp]
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x1400a0640
lea rax, str.Cleanupsys
mov edx, 0x104
lea r9, [rbp]
mov qword [rsp + 0x20], rax
lea r8, str.__s___s
lea rcx, [rbp + 0x210]
call fcn.14004ebd0
xor edx, edx
mov dword [rsp + 0x58], edi
lea rcx, [rbp - 0x70]
lea r8d, [rdx + 0x68]
call fcn.14027b2c0
xor eax, eax
mov dword [rbp - 0x70], 0x68
mov qword [rsp + 0x60], rax
lea rdx, [rbp + 0x210]
mov qword [rsp + 0x68], rax
lea rcx, [rbp]
mov qword [rsp + 0x70], rax
xor r9d, r9d
lea rax, [rsp + 0x60]
xor r8d, r8d
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x1400a07e6
mov rcx, qword [rsp + 0x60]
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, 2
lea rcx, [rbp + 0x420]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [rbp + 0x420]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, qword [r15 + 8]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x10]
call qword [sym.imp.USER32.dll_PostMessageW]
mov edi, 1
jmp 0x1400a0640
lea rcx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rcx, [rbp]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r8d, ntohs
lea rdx, [rbp]
lea rcx, [rbp + 0x420]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1400a0640
xor r8d, r8d
lea rdx, [rbp]
lea rcx, [rbp + 0x420]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x1400a0640