Function at 0x140040170
Capabilities:
Delete file
Set file attributes

Disassembly:
push rbp
push rbx
push rdi
lea rbp, [rsp - 0x10]
sub rsp, 0x110
xor edi, edi
mov word [rbp + 0x3c], 0x100
lea rax, [rbp + 0x48]
mov qword [rbp + 0x48], rdi
mov qword [rsp + 0x50], rax
mov rbx, rcx
mov dword [rsp + 0x48], edi
lea rcx, [rbp + 0x38]
mov dword [rsp + 0x40], edi
xor r9d, r9d
mov dword [rsp + 0x38], edi
xor r8d, r8d
mov dword [rsp + 0x30], edi
mov dl, 1
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
mov qword [rsp + 0x60], rdi
mov dword [rbp + 0x38], edi
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1400403be
lea rax, [rsp + 0x60]
mov dword [rbp + 0x40], edi
mov qword [rsp + 0x50], rax
lea r8d, [rdi + 0x20]
mov dword [rsp + 0x48], edi
lea rcx, [rbp + 0x40]
mov dword [rsp + 0x40], edi
mov r9d, 0x220
mov dword [rsp + 0x38], edi
mov dl, 2
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
mov word [rbp + 0x44], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x14004022c
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
add rsp, 0x110
pop rdi
pop rbx
pop rbp
ret
xorps xmm0, xmm0
mov dword [rsp + 0x70], 0x10000000
xor eax, eax
mov qword [rsp + 0x68], rdi
mov qword [rbp - 0x3c], rax
lea r9, [rsp + 0x68]
mov rax, qword [rbp + 0x48]
lea rdx, [rsp + 0x70]
movups xmmword [rbp - 0x6c], xmm0
xor r8d, r8d
mov qword [rbp - 0x68], rax
mov rax, qword [rsp + 0x60]
movups xmmword [rbp - 0x7c], xmm0
mov qword [rbp - 0x38], rax
movups xmmword [rbp - 0x4c], xmm0
lea ecx, [r8 + 2]
mov dword [rbp - 0x74], edi
movups xmmword [rsp + 0x74], xmm0
mov qword [rsp + 0x74], 2
movups xmmword [rbp - 0x5c], xmm0
mov dword [rbp - 0x70], 2
mov dword [rbp - 0x60], 0x10000000
mov qword [rbp - 0x5c], 2
mov dword [rbp - 0x44], edi
mov dword [rbp - 0x40], 2
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x1400402cf
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
add rsp, 0x110
pop rdi
pop rbx
pop rbp
ret
mov r9, qword [rsp + 0x60]
mov edx, 1
mov qword [rsp + 0x30], rdi
mov r8d, edx
mov qword [rsp + 0x28], rdi
mov rcx, rbx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
jne 0x14004039e
mov rax, qword [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov rcx, rbx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
lea edx, [r9 + 1]
lea r8d, [r9 + 4]
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
jne 0x14004039e
mov edx, pe_nt_image_headers64
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov rax, 0xffffffffffffffff
mov qword [rbp - 0x30], rdi
mov qword [rbp - 0x28], 3
mov qword [rbp - 0xe], rdi
mov dword [rbp - 6], edi
mov word [rbp - 2], di
cmp word [rbx + rax*2 + 2], di
lea rax, [rax + 1]
jne 0x140040354
mov word [rbx + rax*2 + 2], di
mov rcx, rbx
lea rax, [0x14010b41c]
mov qword [rbp - 0x20], rbx
mov qword [rbp - 0x18], rax
mov eax, 0x414
mov word [rbp - 0x10], ax
lea rax, [0x14010b454]
mov qword [rbp], rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14004039e
lea rcx, [rbp - 0x30]
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
mov rcx, qword [rbp + 0x48]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_LocalFree]
add rsp, 0x110
pop rdi
pop rbx
pop rbp
ret