Function at 0x140022b98
Capabilities:
Create directory
Delete registry key
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xe0
xor r15d, r15d
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x40], r15
lea rdx, str.SoftwareMicrosoftNotepadAutosave
mov qword [rsp + 0x38], rax
mov r13, rcx
mov qword [rsp + 0x30], r15
mov ebx, 0xf003f
mov dword [rbp + 0x6f], r15d
xor r9d, r9d
mov dword [rsp + 0x28], ebx
xor r8d, r8d
mov rcx, 0xffffffff80000001
mov dword [rsp + 0x20], r15d
mov qword [rbp + 0x6f], r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x6f]
test eax, eax
jne 0x140022f16
mov rdx, qword [r13 + 0x10]
lea rax, [rbp + 0x77]
mov qword [rsp + 0x40], r15
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], r15d
mov qword [rbp + 0x77], r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x140022efd
call fcn.14000dd9c
or r14, 0xffffffffffffffff
mov r12b, al
test al, al
je 0x140022cab
mov r9, qword [r13 + 0x10]
lea rdx, str._s_s.autosave
mov r8, qword [r13 + 8]
lea rcx, [rbp - 0x69]
mov qword [rbp - 0x69], r15
call fcn.140022454
test eax, eax
jns 0x140022c98
mov rcx, qword [rbp - 0x69]
mov qword [rbp - 0x61], r15
test rcx, rcx
je 0x140022ca0
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
jmp 0x140022ca0
mov rax, qword [rbp - 0x69]
mov qword [rbp - 0x61], rax
lea rax, [rbp - 0x61]
mov ebx, 1
jmp 0x140022cc3
mov r8, r14
lea rdx, [0x14002b370]
lea rcx, [rbp - 0x59]
call fcn.14000a13c
mov ebx, 2
mov rcx, qword [rax]
mov qword [rbp + 0x7f], rcx
mov qword [rax], r15
test bl, 2
je 0x140022cea
mov rcx, qword [rbp - 0x59]
and ebx, 0xfffffffd
test rcx, rcx
je 0x140022cea
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test bl, 1
je 0x140022d04
mov rcx, qword [rbp - 0x61]
test rcx, rcx
je 0x140022d04
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rax, qword [rbp + 0x7f]
test rax, rax
je 0x140022efd
mov rdi, r14
inc rdi
cmp word [rax + rdi*2], r15w
jne 0x140022d14
lea rax, [0x140029230]
mov qword [rbp - 0x69], r15
mov qword [rbp - 0x49], rax
lea rdx, [rbp - 0x51]
lea rax, [rbp - 0x49]
lea rcx, [rbp - 0x69]
mov qword [rbp + 0x1f], rax
call fcn.140010d08
test eax, eax
jns 0x140022d58
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x140022ee8
jmp 0x140022edc
mov rbx, qword [rbp - 0x69]
mov rax, r14
inc rax
cmp word [rbx + rax*2], r15w
jne 0x140022d5f
add rdi, rax
lea rcx, [rbp - 0x59]
xor edx, edx
lea r8, [rdi + 4]
call fcn.14000a13c
mov rax, qword [rbp + 0x7f]
lea rdx, [rdi + 4]
mov rdi, qword [rbp - 0x59]
lea r8, str._i__s__s
mov r9d, dword [0x1400354dc]
mov rcx, rdi
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call fcn.1400085bc
test eax, eax
js 0x140022ec0
mov rcx, qword [0x1400360c8]
lea rdx, str.Untitled
mov qword [rbp - 0x69], r15
mov rsi, r15
test rcx, rcx
je 0x140022df2
lea rdx, [rbp - 0x69]
call fcn.140010ef8
test eax, eax
jns 0x140022de8
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x140022ec0
jmp 0x140022eb4
mov rsi, qword [rbp - 0x69]
mov rdx, rsi
mov r15, rsi
xor eax, eax
inc r14
cmp word [rdi + r14*2], ax
jne 0x140022df4
mov rcx, qword [rbp + 0x77]
lea eax, [r14*2 + 1]
mov dword [rsp + 0x28], eax
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
nop dword [rax + rax]
test eax, eax
je 0x140022e31
test r15, r15
jmp 0x140022eaf
test r12b, r12b
je 0x140022f3c
mov rcx, qword [r13 + 8]
xor edx, edx
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateDirectoryW]
nop dword [rax + rax]
test eax, eax
jne 0x140022e63
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0xb7
jne 0x140022eac
mov r15d, dword [0x1400354d8]
lea rdx, [rbp + 0x7f]
mov r14, qword [0x1400354c8]
xor r9d, r9d
mov r8b, 1
mov dword [0x1400354d8], 2
call fcn.140011f88
test al, al
jne 0x140022f2e
mov rdx, qword [r13 + 0x10]
xor r9d, r9d
mov rcx, qword [rbp + 0x6f]
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteKeyExW]
nop dword [rax + rax]
test rsi, rsi
je 0x140022ec0
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test rdi, rdi
je 0x140022ed4
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test rbx, rbx
je 0x140022ee8
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 + 0x7f]
test rcx, rcx
je 0x140022efd
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x77]
test rcx, rcx
je 0x140022f12
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x6f]
test rcx, rcx
je 0x140022f27
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
xor al, al
jmp 0x140022fb9
mov qword [0x1400354c8], r14
mov dword [0x1400354d8], r15d
test rsi, rsi
je 0x140022f50
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test rdi, rdi
je 0x140022f64
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test rbx, rbx
je 0x140022f78
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 + 0x7f]
test rcx, rcx
je 0x140022f8d
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x77]
test rcx, rcx
je 0x140022fa2
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x6f]
test rcx, rcx
je 0x140022fb7
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov al, 1
mov rbx, qword [rsp + 0x120]
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret