Function at 0x140037e20
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x38
xor r12d, r12d
xor r15d, r15d
mov rdi, rcx
and qword [rbp + 0x50], r12
and qword [rbp + 0x48], r12
mov qword [rbp + 0x60], r12
mov qword [rbp + 0x58], r15
cmp qword [rcx + 0x1d8], r12
jne 0x140037e6e
lea r8, [0x140004208]
lea rcx, [0x140003c50]
mov edx, 0x2305
call fcn.1400a8be8
test byte [rdi + 0x154], 4
lea r13, [0x14017d3a8]
je 0x140037f20
mov rcx, qword [rdi + 0x1d8]
lea r9, [rbp + 0x60]
xor r8d, r8d
xor edx, edx
call fcn.1401335fc
mov r12, qword [rbp + 0x60]
mov ebx, eax
test eax, eax
js 0x140038189
lea rdx, [rbp + 0x58]
mov rcx, r12
call fcn.14011f17c
mov r15, qword [rbp + 0x58]
mov ebx, eax
test eax, eax
js 0x14003817b
test r15, r15
je 0x140037f20
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140037f20
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14017d3a8]
cmp rcx, r13
je 0x140037f0d
test byte [rcx + 0x1c], 1
je 0x140037f0d
cmp byte [rcx + 0x19], 2
jb 0x140037f0d
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003c28]
mov edx, 0x18b
mov r9, r15
mov dword [rsp + 0x20], eax
call fcn.14001ecbc
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14003817b
mov rcx, qword [rdi + 0x1d8]
lea rsi, [rdi + 0x128]
lea r9, [rbp + 0x50]
mov rdx, rsi
xor r8d, r8d
call fcn.1401335fc
mov ebx, eax
test eax, eax
js 0x14003816c
test byte [rdi + 0x154], 1
je 0x140037f76
mov r13, qword [rbp + 0x50]
lea rdx, [rbp + 0x48]
xor r8d, r8d
mov rcx, r13
call fcn.1400a99e4
mov ebx, eax
test eax, eax
js 0x140038153
mov r14, qword [rbp + 0x48]
jmp 0x140037fff
mov rcx, qword [rdi + 0x1d8]
lea r9, [rbp + 0x48]
mov r8b, 1
mov rdx, rsi
call fcn.1401335fc
mov ebx, eax
test eax, eax
js 0x140038153
mov r14, qword [rbp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140037ffb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp eax, 2
je 0x140037ffb
mov rcx, qword [0x14017d3a8]
cmp rcx, r13
je 0x140037fe8
test byte [rcx + 0x1c], 1
je 0x140037fe8
cmp byte [rcx + 0x19], 2
jb 0x140037fe8
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003c28]
mov edx, 0x18c
mov r9, r14
mov dword [rsp + 0x20], eax
call fcn.14001ecbc
movzx ebx, si
or ebx, 0x80070000
test esi, esi
cmovle ebx, esi
jmp 0x140038157
mov r13, qword [rbp + 0x50]
cmp qword [rdi + 0x190], 0
jne 0x140038021
lea r8, [0x140004258]
lea rcx, [0x140003c50]
mov edx, 0x2350
call fcn.1400a8be8
mov rcx, qword [rdi + 0x190]
mov rdx, r14
mov rax, qword [rcx]
call qword [rax + 0x88]
mov ebx, eax
test eax, eax
js 0x140038157
test byte [rdi + 0x154], 1
jne 0x1400380b8
mov r8d, 1
mov rdx, r13
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1400380b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14017d3a8]
lea rax, [0x14017d3a8]
cmp rcx, rax
je 0x1400380a5
test byte [rcx + 0x1c], 1
je 0x1400380a5
cmp byte [rcx + 0x19], 2
jb 0x1400380a5
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003c28]
mov edx, 0x18d
mov r9, r14
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], r13
call fcn.140028ec8
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x140038157
test byte [rdi + 0x154], 0x80
je 0x140038157
cmp byte [rdi + 0x114], 0
je 0x140038157
mov ecx, 0x20
call qword [sym.imp.msvcrt.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__]
xor ecx, ecx
mov rsi, rax
test rax, rax
je 0x1400380fe
lea rax, [0x140005670]
mov byte [rsi + 8], cl
mov qword [rsi + 0x18], rcx
mov qword [rsi], rax
mov qword [rsi + 0x10], rcx
jmp 0x140038101
mov rsi, rcx
mov rdx, r13
mov rcx, rsi
call fcn.14002a734
mov ebx, eax
test eax, eax
js 0x140038157
add rdi, 0x308
mov r13, qword [rdi + 8]
cmp r13, qword [rdi + 0x10]
jb 0x14003813e
lea rdx, [r13 + 1]
mov rcx, rdi
call fcn.14008b270
test al, al
jne 0x14003813e
mov ecx, 0x8007000e
call fcn.14001ad98
int3
mov rax, qword [rdi]
lea rcx, [rax + r13*8]
test rcx, rcx
je 0x14003814d
mov qword [rcx], rsi
inc qword [rdi + 8]
jmp 0x140038157
mov r14, qword [rbp + 0x48]
test r14, r14
je 0x140038165
mov rcx, r14
call qword [sym.imp.ole32.dll_CoTaskMemFree]
lea r13, [0x14017d3a8]
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14003817b
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test r15, r15
je 0x140038189
mov rcx, r15
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test r12, r12
je 0x140038197
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test ebx, ebx
jns 0x1400381cb
mov rcx, qword [0x14017d3a8]
cmp rcx, r13
je 0x1400381cb
test byte [rcx + 0x1c], 1
je 0x1400381cb
cmp byte [rcx + 0x19], 2
jb 0x1400381cb
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003c28]
mov edx, 0x18e
mov r9d, ebx
call fcn.14001de24
mov eax, ebx
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret