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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea eax, [ebp - 0x24]
sub esp, 0x5c
mov dword [esp + 8], eax
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym._parse_registry_key
test eax, eax
je 0x4024d1
cmp dword [ebp + 8], 3
jle 0x402790
mov dword [ebp - 0x38], 0
mov edi, 3
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp + 0xc], ebx
mov ecx, dword [ebp + 0xc]
lea eax, [edi*4]
mov dword [ebp - 0x30], eax
mov ebx, dword [ecx + eax]
movzx eax, word [ebx]
and eax, 0xfffd
cmp eax, 0x2d
jne 0x4024a6
lea esi, [ebx + 2]
mov edx, 0x40909c
mov dword [esp + 4], edx
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x402688
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4024e0
mov ebx, dword [ebp + 0xc]
mov dword [esp], 0x69
call sym._output_message
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsupr]
mov dword [esp], 0x6a
mov dword [esp + 4], eax
call sym._output_message
mov ebx, 1
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x2c], 1
inc edi
cmp dword [ebp + 8], edi
jg 0x402462
mov eax, dword [ebp - 0x3c]
mov ebx, dword [ebp + 0xc]
test eax, eax
mov eax, dword [ebp - 0x2c]
setne dl
or eax, dword [ebp - 0x34]
je 0x402508
test dl, dl
jne 0x4024a9
mov ecx, dword [ebp - 0x34]
mov al, cl
and al, 1
test dword [ebp - 0x2c], ecx
mov byte [ebp - 0x41], al
jne 0x4024a9
cmp dword [ebp - 0x38], 0x300
je 0x4024a9
mov byte [ebp - 0x42], dl
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._get_long_key
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
movzx edx, byte [ebp - 0x42]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x402872
mov dword [esp + 4], esi
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], edi
mov byte [ebp - 0x40], dl
or eax, 0x2001b
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
call sym._RegOpenKeyExW_20
movzx edx, byte [ebp - 0x40]
sub esp, 0x14
test eax, eax
mov ebx, eax
jne 0x40285a
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x20]
test eax, eax
jne 0x402819
mov edi, dword [ebp - 0x34]
test edi, edi
jne 0x402819
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x4028c9
xor eax, eax
mov dword [section..data], eax
mov dword [esp], 0x200
mov edi, 0x100
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x2c], ebx
mov ebx, eax
jmp 0x4025f5
cmp eax, 0xea
jne 0x402926
mov dword [esp], ebx
lea esi, [edi + edi]
shl edi, 2
mov dword [esp + 4], edi
mov edi, esi
call dword [sym.imp.ucrtbase.dll_realloc]
mov ebx, eax
mov esi, dword [ebp - 0x20]
mov dword [esp + 8], ebx
xor eax, eax
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], esi
mov dword [ebp - 0x1c], edi
call sym._RegEnumValueW_32
sub esp, 0x20
test eax, eax
jne 0x4025d0
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._RegDeleteValueW_8
sub esp, 8
test eax, eax
mov esi, eax
je 0x4025f2
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._RegCloseKey_4
mov eax, dword [ebp - 0x30]
push ebx
mov dword [esp + 4], eax
mov dword [esp], 0x12f
call sym._output_message
cmp esi, 2
jne 0x4028f6
call sym._output_error.part.0
nop
jmp 0x4024d1
mov dword [esp], esi
mov eax, 0x4090a2
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x4026c0
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x4024a6
mov dword [ebp - 0x34], 1
jmp 0x4024e7
mov dword [esp], esi
mov eax, 0x4090a8
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x4026f8
mov eax, dword [ebp - 0x38]
test ah, 2
jne 0x4024a6
or eax, 0x200
mov dword [ebp - 0x38], eax
jmp 0x4024e7
mov dword [esp], esi
mov eax, 0x4090b6
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x402730
mov eax, dword [ebp - 0x38]
test ah, 1
jne 0x4024a6
or eax, 0x100
mov dword [ebp - 0x38], eax
jmp 0x4024e7
movzx eax, word [ebx + 2]
test eax, eax
je 0x4024a6
cmp word [ebx + 4], 0
jne 0x4024a6
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towlower]
cmp ax, 0x66
movzx edx, ax
je 0x402802
cmp edx, 0x76
jne 0x4024a6
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
jne 0x4024a6
mov eax, dword [ebp + 0xc]
inc edi
mov edx, dword [ebp - 0x30]
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x3c], eax
test eax, eax
jne 0x4024e7
jmp 0x4024a6
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._get_long_key
mov esi, dword [ebp - 0x24]
xor edx, edx
mov dword [ebp - 0x34], 0
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x41], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x30], eax
mov dword [esp], 0x12e
mov eax, dword [ebp - 0x30]
mov byte [ebp - 0x40], dl
mov dword [esp + 4], eax
call sym._ask_confirm
movzx edx, byte [ebp - 0x40]
mov ebx, eax
test ebx, ebx
jne 0x40254d
mov dword [esp], 0x6d
call sym._output_message
jmp 0x4024d6
mov edx, dword [ebp - 0x40]
test edx, edx
jne 0x4024a6
mov dword [ebp - 0x40], 1
jmp 0x4024e7
mov edi, dword [ebp - 0x2c]
xor ecx, ecx
mov dword [section..data], ecx
test edi, edi
jne 0x4025b1
test dl, dl
jne 0x402907
cmp byte [ebp - 0x41], 0
jne 0x402907
mov dword [esp], esi
call sym._RegCloseKey_4
sub esp, 4
mov dword [esp], 0x6c
call sym._output_message
jmp 0x4024d6
cmp eax, 2
jne 0x4028f6
call sym._output_error.part.0
mov ebx, 1
jmp 0x4024d6
test dl, dl
jne 0x40287c
cmp byte [ebp - 0x41], 0
je 0x40289d
mov dword [esp], 0x12c
mov eax, dword [ebp - 0x3c]
mov byte [ebp - 0x40], dl
mov dword [esp + 4], eax
call sym._ask_confirm
movzx edx, byte [ebp - 0x40]
mov ebx, eax
jmp 0x4027e9
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4027cd
mov dword [esp], 0x12d
mov eax, dword [ebp - 0x30]
mov byte [ebp - 0x40], dl
mov dword [esp + 4], eax
call sym._ask_confirm
movzx edx, byte [ebp - 0x40]
mov ebx, eax
jmp 0x4027e9
mov dword [esp + 4], 0
mov dword [esp], esi
call sym._RegDeleteTreeW_8
test eax, eax
mov ebx, eax
push edx
push edx
je 0x40293c
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._RegCloseKey_4
cmp ebx, 2
push eax
je 0x402863
mov dword [esp], 0x6b
call sym._output_message
jmp 0x4024d1
mov dword [esp], esi
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
call sym._RegDeleteValueW_8
test eax, eax
mov esi, eax
push ecx
push ecx
jne 0x40296e
mov esi, dword [ebp - 0x20]
jmp 0x40283e
mov edx, ebx
mov ebx, dword [ebp - 0x2c]
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [ebp - 0x20]
jmp 0x40283e
mov dword [esp + 4], 0x4090c4
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._RegDeleteKeyW_8
push eax
push eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._RegCloseKey_4
push eax
mov dword [esp], 0x6c
call sym._output_message
jmp 0x4024d6
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._RegCloseKey_4
cmp esi, 2
push edx
je 0x402863
jmp 0x4028f6