Function at 0x140001690
Capabilities:
Delete file
Get file attributes
Set file attributes

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x2f8
xor ebx, ebx
mov rdx, rcx
lea rcx, [rsp + 0xd0]
mov edi, 0xc0000001
mov qword [rsp + 0x330], rbx
mov esi, ebx
mov dword [rsp + 0x328], ebx
call qword [sym.imp.ntoskrnl.exe_RtlInitUnicodeString]
lea rax, [rsp + 0xd0]
mov edx, 0x197d0
xor ecx, ecx
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x78], 0x30
mov qword [rsp + 0x80], rbx
mov dword [rsp + 0x90], 0x40
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0xa0], rbx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov rbp, rax
mov qword [rsp + 0x338], rax
test rax, rax
je 0x140001a3c
xor edx, edx
mov r8d, 0x197d0
mov rcx, rax
call fcn.14000aca0
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x78]
lea rcx, [rsp + 0x330]
mov edx, 0x100
mov dword [rsp + 0x28], 0x204000
mov dword [rsp + 0x20], 7
call qword [sym.imp.ntoskrnl.exe_ZwOpenFile]
test eax, eax
js 0x1400017d6
mov rcx, qword [rsp + 0x330]
xor eax, eax
lea r9d, [rbx + 0x28]
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0xa8], eax
mov dword [rsp + 0xac], eax
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], rax
mov dword [rsp + 0xc8], 0x80
mov dword [rsp + 0x20], 4
call qword [sym.imp.ntoskrnl.exe_ZwSetInformationFile]
mov rcx, qword [rsp + 0x330]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov qword [rsp + 0x330], rbx
mov dword [rsp + 0x50], ebx
mov qword [rsp + 0x48], rbx
mov dword [rsp + 0x40], 0x20
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 1
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x78]
lea rcx, [rsp + 0x330]
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ntoskrnl.exe_ZwCreateFile]
mov edi, eax
test eax, eax
js 0x140001a3c
mov edx, 0x1000
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov qword [rsp + 0x70], rax
test rax, rax
jne 0x14000184c
mov edi, 0xc00000a0
jmp 0x140001a3c
mov rcx, qword [rsp + 0x330]
mov byte [rsp + 0x50], sil
mov qword [rsp + 0x48], rsi
mov byte [rsp + 0x40], sil
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], 0x1000
mov qword [rsp + 0x28], rax
mov rbx, rax
lea rax, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntoskrnl.exe_ZwQueryDirectoryFile]
test eax, eax
js 0x1400019e5
nop dword [rax + rax]
xor eax, eax
add rbx, rax
movzx eax, word [rbx + 0x3c]
cmp eax, 2
je 0x1400018ba
cmp eax, 4
jne 0x1400018c5
cmp word [rbx + 0x42], 0x2e
jne 0x1400018c5
cmp word [rbx + 0x40], 0x2e
je 0x140001acf
mov rdi, qword [rsp + 0x320]
mov ebp, dword [rbx + 0x3c]
xor eax, eax
or rcx, 0xffffffffffffffff
shr rbp, 1
repne scasw ax, word [rdi]
not rcx
lea rax, [rcx + rbp]
cmp rax, 0x104
jae 0x140001976
lea rcx, [rsp + 0xe0]
xor edx, edx
mov r8d, 0x208
call fcn.14000aca0
mov rax, qword [rsp + 0x320]
lea rdx, [rsp + 0xe0]
mov rcx, rax
sub rdx, rax
nop word [rax + rax]
movzx eax, word [rcx]
add rcx, 2
mov word [rdx + rcx - 2], ax
test ax, ax
jne 0x140001920
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xe0]
repne scasw ax, word [rdi]
mov eax, dword [0x14000b3a4]
lea rdx, [rbx + 0x40]
lea rcx, [rsp + 0xe0]
mov r8, rbp
mov dword [rdi - 2], eax
call sub.ntoskrnl.exe_wcsncat
test byte [rbx + 0x38], 0x10
je 0x140001a75
lea rcx, [rsp + 0xe0]
call fcn.140001690
mov esi, dword [rsp + 0x328]
mov rbp, qword [rsp + 0x338]
mov eax, dword [rbx]
test eax, eax
jne 0x1400018a2
mov rdi, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x330]
mov byte [rsp + 0x50], al
mov qword [rsp + 0x48], 0
mov byte [rsp + 0x40], al
mov dword [rsp + 0x38], 1
lea rax, [rsp + 0x60]
mov dword [rsp + 0x30], 0x1000
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
mov rbx, rdi
call qword [sym.imp.ntoskrnl.exe_ZwQueryDirectoryFile]
test eax, eax
jns 0x1400018a0
mov rcx, qword [rsp + 0x330]
test rcx, rcx
je 0x140001a04
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov qword [rsp + 0x330], 0
test esi, esi
je 0x140001a25
lea rdi, [rbp + 4]
mov ebx, esi
nop
mov rcx, rdi
call fcn.140001310
add rdi, 0x414
sub rbx, 1
jne 0x140001a10
lea rcx, [rsp + 0x78]
call qword [sym.imp.ntoskrnl.exe_ZwDeleteFile]
mov ebx, 0
mov edi, eax
test eax, eax
cmovns edi, ebx
mov rcx, qword [rsp + 0x330]
test rcx, rcx
je 0x140001a57
call qword [sym.imp.ntoskrnl.exe_ZwClose]
mov qword [rsp + 0x330], rbx
test rbp, rbp
je 0x140001a67
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, edi
add rsp, 0x2f8
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov esi, dword [rsp + 0x328]
cmp esi, 0x64
jae 0x14000197d
mov rbp, qword [rsp + 0x338]
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xe0]
lea rdx, [rsp + 0xe0]
repne scasw ax, word [rdi]
mov rax, rsi
imul rax, rax, 0x414
not rcx
lea r8, [rcx - 1]
lea rcx, [rax + rbp + 4]
call sub.ntoskrnl.exe_wcsncat
inc esi
mov dword [rsp + 0x328], esi
jmp 0x140001985
mov esi, dword [rsp + 0x328]
jmp 0x140001985