Function at 0x1400466c4
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xe0
mov rax, qword [0x14007b108]
xor rax, rsp
mov qword [rbp + 0x17], rax
xor r14d, r14d
mov dword [rbp - 0x61], edx
mov eax, edx
mov dword [rbp - 0x65], r14d
and al, 1
mov qword [rbp - 0x71], r14
neg al
lea rdx, [rbp - 0x71]
mov r13d, r14d
mov ebx, r14d
sbb r12d, r12d
not r12d
and r12d, 7
call fcn.1400472a8
mov rdi, rax
test rax, rax
je 0x140046c01
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], 0x2200000
mov r8d, r12d
mov edx, 0x10180
mov dword [rsp + 0x20], 3
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140046b85
xorps xmm0, xmm0
lea rdx, [rbp - 0x21]
xor eax, eax
mov rcx, rsi
movups xmmword [rbp - 0x21], xmm0
mov dword [rbp + 0xf], eax
movups xmmword [rbp - 0x11], xmm0
mov qword [rbp - 0x29], rax
movups xmmword [rbp - 1], xmm0
movups xmmword [rbp - 0x49], xmm0
movups xmmword [rbp - 0x39], xmm0
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
nop dword [rax + rax]
test eax, eax
je 0x140046b6e
lea r15d, [r14 + 0x28]
xor edx, edx
mov r9d, r15d
lea r8, [rbp - 0x49]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandleEx]
nop dword [rax + rax]
test eax, eax
je 0x140046b6e
mov r9d, r15d
mov dword [rbp - 0x29], 0x2000
lea r8, [rbp - 0x49]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFileInformationByHandle]
nop dword [rax + rax]
test eax, eax
je 0x140046b57
mov r15, qword [rbp - 0x71]
mov dword [rbp - 0x69], r14d
mov byte [rbp - 0x79], 1
test r15, r15
je 0x140046986
cmp word [r15], r13w
je 0x140046986
lea eax, [r14 + 0x3a]
cmp word [r15 + 2], ax
jne 0x140046986
cmp qword [0x14007ba58], r13
je 0x14004682c
mov rax, qword [0x14007ba60]
test rax, rax
jne 0x14004688d
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
nop dword [rax + rax]
mov r13, rax
test rax, rax
je 0x140046883
lea rdx, str.FindFirstFileNameW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
nop dword [rax + rax]
lea rdx, str.FindNextFileNameW
mov rcx, r13
mov qword [0x14007ba58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
nop dword [rax + rax]
mov qword [0x14007ba60], rax
jmp 0x14004688a
mov rax, qword [0x14007ba60]
xor r13d, r13d
cmp qword [0x14007ba58], r13
je 0x140046986
test rax, rax
je 0x140046986
cmp dword [rbp + 7], 1
jbe 0x140046986
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov edx, 8
mov r8d, 0x10000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14004696e
movzx eax, word [r15]
lea r9, [r14 + 4]
mov word [r14], ax
lea r8, [rbp - 0x71]
mov eax, 0x3a
mov dword [rbp - 0x71], 0x7ffc
mov word [r14 + 2], ax
xor edx, edx
mov rax, qword [0x14007ba58]
mov rcx, rdi
call qword [0x14006c9d0]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140046986
mov rdx, r15
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsicmp]
nop dword [rax + rax]
test eax, eax
jne 0x140046956
mov rax, qword [0x14007ba60]
lea r8, [r14 + 4]
lea rdx, [rbp - 0x71]
mov dword [rbp - 0x71], 0x7ffc
mov rcx, r13
call qword [0x14006c9d0]
test eax, eax
je 0x14004695d
jmp 0x14004691b
mov dword [rbp - 0x69], 1
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FindClose]
nop dword [rax + rax]
jmp 0x140046986
lea r8, str.DeleteFileEx:_Unable_to_allocate_hardlink_path_buffer
mov edx, 0x3000000
lea rcx, [0x14007ba68]
call fcn.140046248
mov r9d, 1
mov dword [rsp + 0x20], FDICreate
lea r8, [rbp - 0x79]
mov rcx, rsi
lea rdx, [rbp - 0x59]
call qword [sym.imp.ntdll.dll_NtSetInformationFile]
nop dword [rax + rax]
mov r15d, eax
test eax, eax
jns 0x140046a02
mov r9d, 4
mov dword [rbp - 0x71], 1
lea r8, [rbp - 0x71]
mov dword [rsp + 0x20], 0x40
lea rdx, [rbp - 0x59]
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtSetInformationFile]
nop dword [rax + rax]
test eax, eax
jns 0x140046a02
cmp eax, 0xc0000003
cmovne r15d, eax
mov ecx, r15d
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
nop dword [rax + rax]
mov r13d, dword [rbp - 0x65]
mov ebx, eax
jmp 0x140046a08
mov r13d, 1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
cmp dword [rbp - 0x69], 0
je 0x140046b29
xor edx, edx
mov rcx, r14
call fcn.1400472a8
test byte [rbp - 0x61], 4
mov rsi, rax
jne 0x140046a6c
mov r15d, 0x4000000
lea r8, str.DeleteFileEx:_hardlink_given_to_us_is:__s
mov edx, r15d
lea rcx, [0x14007ba68]
mov r9, r14
call fcn.140046248
mov r9, rsi
lea r8, str.DeleteFileEx:_Trying_to_set_back_attributes_on:__s
mov edx, r15d
lea rcx, [0x14007ba68]
call fcn.140046248
and qword [rsp + 0x30], 0
xor r9d, r9d
mov dword [rsp + 0x28], 0x2200000
mov r8d, r12d
mov edx, 0x100
mov dword [rsp + 0x20], 3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140046b04
mov eax, dword [rbp - 0x21]
lea r8, [rbp - 0x49]
mov r9d, 0x28
mov dword [rbp - 0x29], eax
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFileInformationByHandle]
nop dword [rax + rax]
test eax, eax
jne 0x140046af5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r9, rsi
lea r8, str.DeleteFileEx:_Unable_to_restore_attributes_on___s___GLE__0x_x
lea rcx, [0x14007ba68]
mov dword [rsp + 0x20], eax
mov edx, 0x3000000
call fcn.140046248
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
test rsi, rsi
je 0x140046b29
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
test r14, r14
je 0x140046be1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140046be1
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
lea r8, str.DeleteFileEx:_Unable_to_clear_out_attributes_on___s___GLE__0x_x
jmp 0x140046bc9
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
lea r8, str.DeleteFileEx:_Unable_to_get_information_on___s___GLE__0x_x
jmp 0x140046bc9
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 5
jne 0x140046bc2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop dword [rax + rax]
test eax, eax
jne 0x140046be1
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
lea r8, str.DeleteFileEx:_Unable_to_delete___s___GLE__0x_x
jmp 0x140046bc9
lea r8, str.DeleteFileEx:_Unable_to_open___s___GLE__0x_x
mov r9, rdi
mov dword [rsp + 0x20], eax
mov edx, 0x3000000
lea rcx, [0x14007ba68]
call fcn.140046248
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov eax, r13d
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140068870
mov rbx, qword [rsp + 0x130]
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret