Function at 0x140022e0c
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 0x140022f99
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 0x140022f84
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 0x140022f80
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.14000a064
lea r8, [rdi + 1]
xor edx, edx
lea rcx, [rbp + 0x6f]
call fcn.14000a064
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 0x140022fc1
test rsi, rsi
je 0x140022f6c
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 0x140022f80
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 0x140022f95
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 0x140022faa
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 0x140022f5d
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 0x140022f5d
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 0x1400230a4
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.14000a064
mov rdx, rax
lea rcx, [rbp - 1]
call fcn.14000a37c
mov rcx, qword [rbp + 0xf]
test rcx, rcx
je 0x14002306a
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.14000a064
mov rdx, rax
lea rcx, [rbp + 0x6f]
call fcn.14000a37c
mov rcx, qword [rbp + 0xf]
xor r13d, r13d
test rcx, rcx
je 0x14002309e
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov r14, qword [rbp + 0x6f]
jmp 0x1400230dd
sub rdi, r15
lea rcx, [rbp + 0x6f]
sub rdi, r12
sar rdi, 1
mov r8, rdi
call fcn.14000a064
mov rdx, rax
lea rcx, [rbp - 1]
call fcn.14000a37c
mov rcx, qword [rbp + 0x6f]
xor r13d, r13d
test rcx, rcx
je 0x1400230dd
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 0x140023119
mov rax, qword [0x1400345e0]
mov rdx, rbx
sub rdx, rax
movzx ecx, word [rax]
movzx r8d, word [rax + rdx]
sub ecx, r8d
jne 0x140023112
add rax, r12
test r8d, r8d
jne 0x1400230fd
mov r12b, r13b
test ecx, ecx
jne 0x14002311c
mov r12b, 1
mov rdi, qword [rbp - 1]
movzx r15d, word [rdi]
test r15w, r15w
setne byte [rbp + 0x6f]
test r14, r14
je 0x140023146
cmp word [r14], r13w
je 0x140023146
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 0x14002315a
test r12b, r12b
jne 0x1400232ab
mov rcx, rbx
jmp 0x14002315d
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 0x1400231d4
mov edx, dword [rbp - 0x19]
test r15w, r15w
mov r8b, byte [rbp + 0x6f]
mov rcx, qword [rbp + 0xf]
cmovne edx, r13d
call fcn.1400112ec
mov rbx, qword [rbp + 7]
mov rdi, qword [rbp - 1]
test al, al
jne 0x1400231dc
mov rcx, rdi
call fcn.140010ef0
test r15w, r15w
je 0x1400232ab
lea rdx, [0x1400360c8]
lea rcx, [rbp - 1]
call fcn.14000a37c
xor ecx, ecx
movzx eax, r12b
mov dword [0x140034600], eax
test r12b, r12b
je 0x140023214
mov qword [rbp + 7], rcx
lea rdx, [rbp + 7]
lea edi, [rcx + 1]
jmp 0x140023222
mov qword [rbp + 0x6f], rbx
lea rdx, [rbp + 0x6f]
mov rbx, rcx
mov edi, r13d
lea rcx, [0x1400360c8]
call fcn.14000a37c
test r13b, dil
je 0x14002324b
mov rcx, qword [rbp + 0x6f]
and edi, 0xfffffffd
test rcx, rcx
je 0x14002324b
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test dil, 1
je 0x140023266
mov rcx, qword [rbp + 7]
test rcx, rcx
je 0x140023266
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.140010264
call fcn.14000fe20
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 0x1400232dd
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 0x1400232f1
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 0x140023314
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 0x140023329
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 0x14002333e
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov al, 1
jmp 0x140022fac