Function at 0x402440
Capabilities:
Delete registry key
Delete registry value
Query or enumerate registry value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov r13d, 1
mov rbx, rdx
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x68]
mov esi, ecx
mov rcx, qword [rbx + 0x10]
call sym.parse_registry_key
test eax, eax
je 0x402512
cmp esi, 3
jle 0x4027e0
mov dword [rsp + 0x58], 0
mov rbp, qword [sym.imp.kernel32.dll_lstrcmpiW]
xor r12d, r12d
mov edi, 3
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x4c], 0
mov qword [rsp + 0x50], 0
movsxd rax, edi
mov r15, qword [rbx + rax*8]
lea r13, [rax*8]
movzx eax, word [r15]
and eax, 0xfffffffd
cmp ax, 0x2d
jne 0x4024eb
lea r14, [r15 + 2]
lea rdx, [0x00409110]
mov rcx, r14
call rbp
test eax, eax
jne 0x4026f0
test r12d, r12d
je 0x402530
mov ecx, 0x69
call sym.output_message
mov rcx, qword [rbx + 8]
call qword [sym.imp.ucrtbase.dll__wcsupr]
mov ecx, 0x6a
mov rdx, rax
call sym.output_message
mov r13d, 1
mov eax, r13d
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r12d, 1
add edi, 1
cmp esi, edi
jg 0x4024b2
movzx eax, byte [rsp + 0x4c]
cmp qword [rsp + 0x50], 0
setne sil
or al, r12b
je 0x40255a
test sil, sil
jne 0x4024eb
mov edi, dword [rsp + 0x4c]
mov eax, edi
and eax, 1
cmp dword [rsp + 0x58], 0x300
mov r14d, eax
je 0x4024eb
test dil, r12b
jne 0x4024eb
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
call sym.get_long_key
mov edx, dword [rsp + 0x5c]
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x68]
mov rbx, rax
test edx, edx
je 0x40289b
mov r9d, dword [rsp + 0x58]
lea rax, [rsp + 0x78]
xor r8d, r8d
mov rdx, rbp
mov qword [rsp + 0x20], rax
mov rcx, rdi
or r9d, 0x2001b
call qword [sym.imp.advapi32.dll_RegOpenKeyExW]
mov r13d, eax
test eax, eax
jne 0x4028da
cmp qword [rsp + 0x50], 0
mov r15, qword [rsp + 0x78]
jne 0x40285e
mov eax, dword [rsp + 0x4c]
test eax, eax
jne 0x40285e
test r12d, r12d
je 0x4028fd
mov dword [section..data], 0
mov ecx, 0x200
mov esi, 0x100
lea rbp, [rsp + 0x64]
call qword [sym.imp.ucrtbase.dll_malloc]
mov rdi, qword [sym.imp.advapi32.dll_RegEnumValueW]
mov r12, qword [sym.imp.ucrtbase.dll_realloc]
mov r14, rax
jmp 0x402652
cmp eax, 0xea
jne 0x40292f
lea edx, [rsi + rsi]
mov rcx, r14
mov rsi, rdx
add rdx, rdx
call r12
mov r14, rax
mov r15, qword [rsp + 0x78]
xor edx, edx
mov dword [rsp + 0x64], esi
mov r9, rbp
mov r8, r14
mov qword [rsp + 0x38], 0
mov rcx, r15
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call rdi
test eax, eax
jne 0x402630
mov rcx, qword [rsp + 0x78]
mov rdx, r14
call qword [sym.imp.advapi32.dll_RegDeleteValueW]
mov r15d, eax
test eax, eax
je 0x40264d
mov rcx, r14
call qword [sym.imp.ucrtbase.dll_free]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.advapi32.dll_RegCloseKey]
mov rdx, rbx
mov ecx, 0x12f
call sym.output_message
cmp r15d, 2
jne 0x402920
cmp dword [section..data], 0
je 0x4029ba
mov ecx, 0x6e
call sym.output_message
jmp 0x40250c
lea rdx, [0x00409116]
mov rcx, r14
call rbp
test eax, eax
jne 0x402720
mov r8d, dword [rsp + 0x4c]
test r8d, r8d
jne 0x4024eb
mov dword [rsp + 0x4c], 1
jmp 0x402536
lea rdx, [0x0040911c]
mov rcx, r14
call rbp
test eax, eax
jne 0x402750
mov eax, dword [rsp + 0x58]
test ah, 2
jne 0x4024eb
or ah, 2
mov dword [rsp + 0x58], eax
jmp 0x402536
lea rdx, [0x0040912a]
mov rcx, r14
call rbp
test eax, eax
jne 0x402780
mov eax, dword [rsp + 0x58]
test ah, 1
jne 0x4024eb
or ah, 1
mov dword [rsp + 0x58], eax
jmp 0x402536
movzx ecx, word [r15 + 2]
test cx, cx
je 0x4024eb
cmp word [r15 + 4], 0
jne 0x4024eb
call qword [sym.imp.ucrtbase.dll_towlower]
cmp ax, 0x66
je 0x402845
cmp ax, 0x76
jne 0x4024eb
cmp qword [rsp + 0x50], 0
jne 0x4024eb
mov rax, qword [rbx + r13 + 8]
add edi, 1
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x402536
jmp 0x4024eb
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
xor esi, esi
xor r14d, r14d
xor r12d, r12d
call sym.get_long_key
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x68]
mov dword [rsp + 0x4c], 0
mov qword [rsp + 0x50], 0
mov rbx, rax
mov dword [rsp + 0x58], 0
mov rdx, rbx
mov ecx, 0x12e
call sym.ask_confirm
mov r13d, eax
test r13d, r13d
jne 0x4025a5
mov ecx, 0x6d
call sym.output_message
jmp 0x402512
mov ecx, dword [rsp + 0x5c]
test ecx, ecx
jne 0x4024eb
mov dword [rsp + 0x5c], 1
jmp 0x402536
mov dword [section..data], 0
test r12d, r12d
jne 0x402605
test sil, sil
jne 0x402942
test r14b, r14b
jne 0x402942
mov rcx, r15
call qword [sym.imp.advapi32.dll_RegCloseKey]
mov ecx, 0x6c
call sym.output_message
jmp 0x402512
test sil, sil
jne 0x4028a5
test r14b, r14b
je 0x4028bc
mov rdx, qword [rsp + 0x50]
mov ecx, 0x12c
call sym.ask_confirm
mov r13d, eax
jmp 0x40282d
test r12d, r12d
je 0x40281d
mov rdx, rbx
mov ecx, 0x12d
call sym.ask_confirm
mov r13d, eax
jmp 0x40282d
cmp eax, 2
jne 0x402920
cmp dword [section..data], 0
je 0x402960
mov ecx, 0x6e
mov r13d, 1
call sym.output_message
jmp 0x402512
xor edx, edx
mov rcx, r15
call qword [sym.imp.advapi32.dll_RegDeleteTreeW]
mov r13d, eax
test eax, eax
je 0x402975
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.advapi32.dll_RegCloseKey]
cmp r13d, 2
je 0x4028df
mov ecx, 0x6b
call sym.output_message
jmp 0x40250c
mov rcx, r14
call qword [sym.imp.ucrtbase.dll_free]
mov r15, qword [rsp + 0x78]
jmp 0x402883
mov rdx, qword [rsp + 0x50]
mov rcx, r15
call qword [sym.imp.advapi32.dll_RegDeleteValueW]
mov ebx, eax
test eax, eax
jne 0x4029a1
mov r15, qword [rsp + 0x78]
jmp 0x402883
mov ecx, 0x6f
mov r13d, 1
call sym.output_message
jmp 0x402512
mov rcx, qword [rsp + 0x78]
lea rdx, [0x00409138]
call qword [sym.imp.advapi32.dll_RegDeleteKeyW]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.advapi32.dll_RegCloseKey]
mov ecx, 0x6c
call sym.output_message
jmp 0x402512
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.advapi32.dll_RegCloseKey]
cmp ebx, 2
je 0x4028df
jmp 0x402920
mov ecx, 0x6f
call sym.output_message
jmp 0x40250c