Function at 0x140022ecc
Capabilities:
Delete file
Delete registry key
Query or enumerate registry value
Set current directory

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x98
xor r12d, r12d
lea rax, [rbp - 0x11]
mov rbx, rcx
mov dword [rbp + 0x6f], r12d
mov edi, 0xf003f
mov qword [rbp - 0x11], r12
mov r9d, edi
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftNotepadAutosave
mov rcx, 0xffffffff80000001
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x11]
test eax, eax
jne 0x140023059
mov rdx, qword [rbx + 0x10]
lea rax, [rbp - 9]
mov r9d, edi
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov qword [rbp - 9], r12
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov rcx, qword [rbp - 9]
test eax, eax
jne 0x140023044
mov qword [rsp + 0x58], r12
lea rax, [rbp + 0x7f]
mov qword [rsp + 0x50], r12
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
lea rax, [rbp + 0x77]
xor edx, edx
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x15]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryInfoKeyW]
nop dword [rax + rax]
test eax, eax
jne 0x140023040
mov eax, dword [rbp + 0x77]
lea rcx, [rbp + 7]
mov edi, dword [rbp + 0x7f]
inc eax
mov r8d, eax
xor edx, edx
mov dword [rbp + 0x77], eax
shr rdi, 1
call fcn.14000a124
lea r8, [rdi + 1]
xor edx, edx
lea rcx, [rbp + 0x6f]
call fcn.14000a124
mov rsi, qword [rbp + 0x6f]
lea rax, [rbp + 0x7f]
mov rbx, qword [rbp + 7]
lea r9, [rbp + 0x77]
mov rcx, qword [rbp - 9]
mov r8, rbx
mov qword [rsp + 0x38], rax
xor edx, edx
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumValueW]
nop dword [rax + rax]
test eax, eax
je 0x140023081
test rsi, rsi
je 0x14002302c
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test rbx, rbx
je 0x140023040
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, qword [rbp - 9]
test rcx, rcx
je 0x140023055
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x11]
test rcx, rcx
je 0x14002306a
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
xor al, al
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdi, [rsi + rdi*2]
mov word [rdi], r12w
movzx eax, word [rsi]
add eax, 0xffffffd0
mov dword [rbp - 0x19], eax
cmp eax, 6
ja 0x14002301d
mov r14d, 0x2c
mov rcx, rsi
mov edx, r14d
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcschr]
nop dword [rax + rax]
mov r15, rax
test rax, rax
je 0x14002301d
lea rcx, [rax + 2]
mov edx, r14d
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcschr]
nop dword [rax + rax]
mov qword [rbp - 1], r12
lea rdx, [r15 + 2]
mov qword [rbp + 0x6f], r12
mov r14, r12
mov r13, rax
mov r12d, 2
test rax, rax
je 0x140023164
sub rdi, rax
lea rcx, [rbp + 0xf]
mov r8, rax
sub rdi, r12
sub r8, r15
sar rdi, 1
sub r8, r12
sar r8, 1
call fcn.14000a124
mov rdx, rax
lea rcx, [rbp - 1]
call fcn.14000a43c
mov rcx, qword [rbp + 0xf]
test rcx, rcx
je 0x14002312a
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
lea rdx, [r13 + 2]
mov r8, rdi
lea rcx, [rbp + 0xf]
call fcn.14000a124
mov rdx, rax
lea rcx, [rbp + 0x6f]
call fcn.14000a43c
mov rcx, qword [rbp + 0xf]
xor r13d, r13d
test rcx, rcx
je 0x14002315e
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov r14, qword [rbp + 0x6f]
jmp 0x14002319d
sub rdi, r15
lea rcx, [rbp + 0x6f]
sub rdi, r12
sar rdi, 1
mov r8, rdi
call fcn.14000a124
mov rdx, rax
lea rcx, [rbp - 1]
call fcn.14000a43c
mov rcx, qword [rbp + 0x6f]
xor r13d, r13d
test rcx, rcx
je 0x14002319d
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rdx, rbx
lea rcx, str.Untitled
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscmp
test eax, eax
je 0x1400231d9
mov rax, qword [0x1400345e0]
mov rdx, rbx
sub rdx, rax
movzx ecx, word [rax]
movzx r8d, word [rax + rdx]
sub ecx, r8d
jne 0x1400231d2
add rax, r12
test r8d, r8d
jne 0x1400231bd
mov r12b, r13b
test ecx, ecx
jne 0x1400231dc
mov r12b, 1
mov rdi, qword [rbp - 1]
movzx r15d, word [rdi]
test r15w, r15w
setne byte [rbp + 0x6f]
test r14, r14
je 0x140023206
cmp word [r14], r13w
je 0x140023206
mov rcx, r14
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetCurrentDirectoryW]
nop dword [rax + rax]
test r15w, r15w
jne 0x14002321a
test r12b, r12b
jne 0x14002336b
mov rcx, rbx
jmp 0x14002321d
mov rcx, rdi
lea rdx, [rbp - 1]
mov qword [rsp + 0x30], r13
mov r8d, 3
mov dword [rsp + 0x28], 0x80
test r15w, r15w
mov dword [rsp + 0x20], r8d
lea rax, [rbp + 7]
cmovne rax, rdx
xor r9d, r9d
mov edx, 0x80000000
mov qword [rbp + 0xf], rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
nop dword [rax + rax]
mov qword [0x1400354c8], rax
mov r13d, 2
cmp rax, 0xffffffffffffffff
je 0x140023294
mov edx, dword [rbp - 0x19]
test r15w, r15w
mov r8b, byte [rbp + 0x6f]
mov rcx, qword [rbp + 0xf]
cmovne edx, r13d
call fcn.1400113ac
mov rbx, qword [rbp + 7]
mov rdi, qword [rbp - 1]
test al, al
jne 0x14002329c
mov rcx, rdi
call fcn.140010fb0
test r15w, r15w
je 0x14002336b
lea rdx, [0x1400360c8]
lea rcx, [rbp - 1]
call fcn.14000a43c
xor ecx, ecx
movzx eax, r12b
mov dword [0x140034600], eax
test r12b, r12b
je 0x1400232d4
mov qword [rbp + 7], rcx
lea rdx, [rbp + 7]
lea edi, [rcx + 1]
jmp 0x1400232e2
mov qword [rbp + 0x6f], rbx
lea rdx, [rbp + 0x6f]
mov rbx, rcx
mov edi, r13d
lea rcx, [0x1400360c8]
call fcn.14000a43c
test r13b, dil
je 0x14002330b
mov rcx, qword [rbp + 0x6f]
and edi, 0xfffffffd
test rcx, rcx
je 0x14002330b
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test dil, 1
je 0x140023326
mov rcx, qword [rbp + 7]
test rcx, rcx
je 0x140023326
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov eax, dword [rbp - 0x19]
xor r9d, r9d
mov rcx, qword [0x1400365c8]
mov edx, 0xb9
mov dword [0x1400354dc], eax
lea r8d, [r9 + 1]
call qword [sym.imp.USER32.dll_SendMessageW]
nop dword [rax + rax]
call fcn.140010324
call fcn.14000fee0
mov rdi, qword [rbp - 1]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_DeleteFileW]
nop dword [rax + rax]
mov rdx, qword [rbp + 0x67]
xor r9d, r9d
mov rcx, qword [rbp - 0x11]
xor r8d, r8d
mov rdx, qword [rdx + 0x10]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteKeyExW]
nop dword [rax + rax]
test r14, r14
je 0x14002339d
mov rcx, r14
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test rdi, rdi
je 0x1400233b1
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test rbx, rbx
je 0x1400233d4
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, qword [rbp - 9]
test rcx, rcx
je 0x1400233e9
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x11]
test rcx, rcx
je 0x1400233fe
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov al, 1
jmp 0x14002306c