Function at 0x140022a88
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 0x140022e06
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 0x140022ded
call fcn.14000dd8c
or r14, 0xffffffffffffffff
mov r12b, al
test al, al
je 0x140022b9b
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.140022344
test eax, eax
jns 0x140022b88
mov rcx, qword [rbp - 0x69]
mov qword [rbp - 0x61], r15
test rcx, rcx
je 0x140022b90
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
jmp 0x140022b90
mov rax, qword [rbp - 0x69]
mov qword [rbp - 0x61], rax
lea rax, [rbp - 0x61]
mov ebx, 1
jmp 0x140022bb3
mov r8, r14
lea rdx, [0x14002b370]
lea rcx, [rbp - 0x59]
call fcn.14000a124
mov ebx, 2
mov rcx, qword [rax]
mov qword [rbp + 0x7f], rcx
mov qword [rax], r15
test bl, 2
je 0x140022bda
mov rcx, qword [rbp - 0x59]
and ebx, 0xfffffffd
test rcx, rcx
je 0x140022bda
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop dword [rax + rax]
test bl, 1
je 0x140022bf4
mov rcx, qword [rbp - 0x61]
test rcx, rcx
je 0x140022bf4
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 0x140022ded
mov rdi, r14
inc rdi
cmp word [rax + rdi*2], r15w
jne 0x140022c04
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.140010cf8
test eax, eax
jns 0x140022c48
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x140022dd8
jmp 0x140022dcc
mov rbx, qword [rbp - 0x69]
mov rax, r14
inc rax
cmp word [rbx + rax*2], r15w
jne 0x140022c4f
add rdi, rax
lea rcx, [rbp - 0x59]
xor edx, edx
lea r8, [rdi + 4]
call fcn.14000a124
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.1400085cc
test eax, eax
js 0x140022db0
mov rcx, qword [0x1400360c8]
lea rdx, str.Untitled
mov qword [rbp - 0x69], r15
mov rsi, r15
test rcx, rcx
je 0x140022ce2
lea rdx, [rbp - 0x69]
call fcn.140010ee8
test eax, eax
jns 0x140022cd8
mov rcx, qword [rbp - 0x69]
test rcx, rcx
je 0x140022db0
jmp 0x140022da4
mov rsi, qword [rbp - 0x69]
mov rdx, rsi
mov r15, rsi
xor eax, eax
inc r14
cmp word [rdi + r14*2], ax
jne 0x140022ce4
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 0x140022d21
test r15, r15
jmp 0x140022d9f
test r12b, r12b
je 0x140022e2c
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 0x140022d53
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 0xb7
jne 0x140022d9c
mov r15d, dword [0x1400354d8]
lea rdx, [rbp + 0x7f]
mov r14, qword [0x1400354c8]
xor r9d, r9d
mov r8b, 1
mov dword [0x1400354d8], 2
call fcn.140011f78
test al, al
jne 0x140022e1e
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 0x140022db0
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 0x140022dc4
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 0x140022dd8
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 0x140022ded
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 0x140022e02
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 0x140022e17
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
xor al, al
jmp 0x140022ea9
mov qword [0x1400354c8], r14
mov dword [0x1400354d8], r15d
test rsi, rsi
je 0x140022e40
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 0x140022e54
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 0x140022e68
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 0x140022e7d
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 0x140022e92
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 0x140022ea7
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