Function at 0x140001ac0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2e8
lea rax, [rcx + 0x10]
mov dword [rsp + 0x348], r9d
mov r9d, r8d
mov rbp, rcx
mov dword [rsp + 0x340], r8d
mov r14, rdx
xor r8d, r8d
mov rdx, qword [rcx + 8]
or r9d, 0x20019
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx]
call qword [sym.imp.advapi32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140001ed8
mov rcx, qword [r14]
mov rdx, qword [r14 + 8]
xor r9d, r9d
xor r8d, r8d
lea rax, [rsp + 0xac]
mov dword [rsp + 0x20], 0
mov qword [rsp + 0x40], rax
lea rax, [r14 + 0x10]
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x340]
mov qword [rsp + 0x30], 0
or eax, 0x2001f
mov dword [rsp + 0x28], eax
call qword [sym.imp.advapi32.dll_RegCreateKeyExW]
mov rcx, qword [rbp + 0x10]
mov ebx, eax
test eax, eax
jne 0x140001ea0
lea rax, [rsp + 0xa0]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x98]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x94]
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
call qword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x140001ef0
mov ebx, dword [rsp + 0x94]
cmp dword [rsp + 0x98], ebx
cmovae ebx, dword [rsp + 0x98]
mov rdi, qword [sym.imp.ucrtbase.dll_malloc]
lea ecx, [rbx + 1]
mov qword [rsp + 0x70], rdi
mov dword [rsp + 0x98], ecx
mov rbx, rcx
add rcx, rcx
call rdi
mov r13, rax
test rax, rax
je 0x140002170
mov ecx, dword [rsp + 0xa0]
mov rsi, rcx
call rdi
mov rdi, rax
test rax, rax
je 0x1400020a0
lea rax, [rsp + 0xa4]
xor r12d, r12d
lea r15, [rsp + 0x9c]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x68], rax
mov eax, ebx
mov ebx, dword [rsp + 0x350]
jmp 0x140001ca1
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rcx, qword [r14 + 0x10]
mov rdx, r13
mov eax, dword [rsp + 0xa4]
mov r9d, dword [rsp + 0xa8]
mov dword [rsp + 0x28], eax
call qword [sym.imp.advapi32.dll_RegSetValueExW]
test eax, eax
jne 0x1400020b8
mov eax, dword [rsp + 0x98]
mov esi, dword [rsp + 0xa0]
inc r12d
mov dword [rsp + 0x9c], eax
mov r9, r15
mov r8, r13
mov edx, r12d
mov rax, qword [rsp + 0x60]
mov dword [rsp + 0xa4], esi
mov qword [rsp + 0x30], rdi
mov rcx, qword [rbp + 0x10]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x28], rax
call qword [sym.imp.advapi32.dll_RegEnumValueW]
cmp eax, 0x103
je 0x140001f30
test eax, eax
jne 0x1400020a0
test ebx, ebx
jne 0x140001c60
cmp dword [rsp + 0xac], 2
jne 0x140001c60
mov rcx, qword [r14 + 0x10]
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.advapi32.dll_RegQueryValueExW]
mov dword [rsp + 0x78], eax
test eax, eax
jne 0x140001c60
mov rax, qword [rbp + 0x18]
xor ecx, ecx
mov qword [rsp + 0x80], rax
call qword [sym.imp.kernel32.dll_GetModuleHandleW]
mov r9d, 4
mov edx, 0x64
mov rbx, qword [0x14000e588]
mov rsi, rax
lea r8, [0x14000d050]
mov rcx, rax
call rbx
mov rcx, rsi
mov r9d, 4
mov edx, 0x65
lea r8, [0x14000d048]
call rbx
mov rcx, rsi
mov r9d, 4
mov edx, 0x66
lea r8, [0x14000d040]
call rbx
mov rcx, rsi
mov r9d, 0x20
mov edx, 0x70
lea r8, [section..bss]
lea rsi, [rsp + 0xb0]
call rbx
cmp word [r13], 0
lea rax, [section..bss]
mov dword [rsp + 0x8c], r12d
cmovne rax, r13
mov r12, qword [rsp + 0x80]
lea rbx, [rsp + 0xd0]
mov qword [rsp + 0x80], r13
mov r13, rax
jmp 0x140001e1a
cmp ax, word [0x14000d048]
je 0x14000210f
cmp ax, word [0x14000d040]
je 0x140002126
mov r8, r13
mov rdx, r12
mov ecx, 0xfb
call sym.output_message
mov ecx, 0x68
call sym.output_message
mov ecx, 0xfffffff6
call qword [sym.imp.kernel32.dll_GetStdHandle]
mov rdx, rbx
mov r9, rsi
mov r8d, 0x104
mov qword [rsp + 0x20], 0
mov rcx, rax
call qword [sym.imp.kernel32.dll_ReadConsoleW]
movzx ecx, word [rsp + 0xd0]
call qword [sym.imp.ucrtbase.dll_towupper]
lea rdx, [0x14000d050]
mov word [rsp + 0xd0], ax
cmp ax, word [rdx]
jne 0x140001e00
mov r12d, dword [rsp + 0x8c]
mov r13, qword [rsp + 0x80]
mov ebx, dword [rsp + 0x78]
jmp 0x140001c60
call qword [sym.imp.advapi32.dll_RegCloseKey]
cmp ebx, 2
je 0x140001edd
mov ecx, 0x6b
mov r12d, 1
call sym.output_message
mov eax, r12d
add rsp, 0x2e8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp eax, 2
jne 0x140001eab
mov ecx, 0x6e
mov r12d, 1
call sym.output_message
jmp 0x140001ebb
xor r12d, r12d
mov rbx, qword [sym.imp.ucrtbase.dll_free]
cmp eax, 0x103
setne r12b
xor edi, edi
xor r13d, r13d
mov rcx, r13
call rbx
mov rcx, rdi
call rbx
mov rcx, qword [rbp + 0x10]
mov rbx, qword [sym.imp.advapi32.dll_RegCloseKey]
call rbx
mov rcx, qword [r14 + 0x10]
call rbx
jmp 0x140001ebb
mov eax, dword [rsp + 0x348]
mov dword [rsp + 0x350], ebx
xor r12d, r12d
mov rbx, qword [sym.imp.ucrtbase.dll_free]
test eax, eax
je 0x140001f08
lea rax, [rsp + 0xd0]
xor esi, esi
mov qword [rsp + 0x78], rdi
mov rbx, qword [sym.imp.ucrtbase.dll_free]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0xb0]
mov edi, esi
mov qword [rsp + 0x68], rax
nop word cs:[rax + rax]
mov eax, dword [rsp + 0x98]
mov rcx, qword [rbp + 0x10]
mov r9, r15
mov edx, edi
mov qword [rsp + 0x38], 0
mov r8, r13
mov dword [rsp + 0x9c], eax
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.advapi32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140002143
mov rax, qword [rbp + 0x10]
mov rsi, qword [rbp + 0x18]
mov qword [rsp + 0xb8], r13
mov qword [rsp + 0xd8], r13
mov qword [rsp + 0xb0], rax
mov rax, qword [r14 + 0x10]
mov qword [rsp + 0xd0], rax
cmp word [rsi], 0
je 0x140002108
mov rax, rsi
nop dword [rax]
add rax, 2
cmp word [rax], 0
jne 0x140002008
sub rax, rsi
sar rax, 1
mov edx, dword [rsp + 0x9c]
lea r12d, [rax + rdx + 2]
mov rax, qword [rsp + 0x70]
lea rcx, [r12 + r12]
call rax
mov qword [rsp + 0xc8], rax
mov rcx, rax
test rax, rax
je 0x140002184
mov qword [rsp + 0x20], r13
mov r9, rsi
lea r8, [0x1400090e0]
mov rdx, r12
call sym.swprintf.constprop.0
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x60]
mov r9d, 1
mov eax, dword [rsp + 0x350]
mov r8d, dword [rsp + 0x340]
mov dword [rsp + 0x20], eax
call sym.run_copy
mov rcx, qword [rsp + 0xc8]
mov esi, eax
call rbx
test esi, esi
jne 0x140002159
inc edi
jmp 0x140001f80
mov rbx, qword [sym.imp.ucrtbase.dll_free]
mov r12d, 1
jmp 0x140001f08
cmp eax, 2
je 0x1400020e7
mov ecx, 0x6b
mov dword [rsp + 0x60], eax
xor r12d, r12d
call sym.output_message
mov eax, dword [rsp + 0x60]
mov rbx, qword [sym.imp.ucrtbase.dll_free]
cmp eax, 0x103
setne r12b
jmp 0x140001f08
mov ecx, 0x6e
mov r12d, 1
call sym.output_message
mov rbx, qword [sym.imp.ucrtbase.dll_free]
jmp 0x140001f08
xor eax, eax
jmp 0x140002018
mov r12d, dword [rsp + 0x8c]
mov r13, qword [rsp + 0x80]
xor ebx, ebx
jmp 0x140001c90
mov dword [rsp + 0x78], 1
mov r12d, dword [rsp + 0x8c]
mov r13, qword [rsp + 0x80]
jmp 0x140001e8f
xor r12d, r12d
cmp eax, 0x103
mov rdi, qword [rsp + 0x78]
setne r12b
jmp 0x140001f08
mov rdi, qword [rsp + 0x78]
xor r12d, r12d
cmp esi, 0x103
setne r12b
jmp 0x140001f08
mov rbx, qword [sym.imp.ucrtbase.dll_free]
xor edi, edi
mov r12d, 1
jmp 0x140001f08
mov rdi, qword [rsp + 0x78]
mov esi, 8
jmp 0x14000215e