Function at 0x4021bd
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x434
mov eax, dword [0x41b214]
xor eax, esp
mov dword [esp + 0x430], eax
mov eax, dword [ebp + 0xc]
and dword [esp], 0
push ebx
push esi
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x20], eax
mov eax, edi
mov dword [esp + 0x14], ecx
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x40264b
cmp word [edi], 0x7d
je 0x402649
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str.Delete
push edi
mov dword [esp + 0x24], 1
call esi
mov ebx, eax
neg ebx
push str.ForceRemove
sbb ebx, ebx
push edi
inc ebx
call esi
test eax, eax
je 0x40223f
test ebx, ebx
je 0x40230b
mov ecx, dword [esp + 0x14]
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
cmp dword [ebp + 0x10], 0
je 0x40230b
push 0x5c
mov eax, edi
call fcn.004019ca
test eax, eax
pop ecx
jne 0x4026ff
push edi
call fcn.00401e36
test eax, eax
je 0x40228c
mov eax, dword [esp + 0x18]
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
call fcn.0040137a
test ebx, ebx
je 0x40230b
mov ecx, dword [esp + 0x14]
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
mov ecx, dword [esp + 0x14]
call fcn.00401e97
mov esi, eax
test esi, esi
jl 0x402638
cmp word [edi], 0x7b
jne 0x4022fc
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x4022fc
mov ecx, dword [esp + 0x14]
push 0
push dword [ebp + 0x10]
push dword [esp + 0x14]
push edi
call fcn.004021bd
mov esi, eax
test esi, esi
jl 0x402638
mov ecx, dword [esp + 0x14]
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
cmp word [edi], 0x7d
jne 0x40220e
jmp 0x402638
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x402334
and dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x14]
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
push 0x417f8c
push edi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x402425
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x230]
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
mov ecx, dword [esp + 0x14]
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
cmp word [edi], 0x3d
jne 0x4026ff
cmp dword [ebp + 0x10], ebx
je 0x4023b9
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
push edi
lea eax, [esp + 0x234]
push eax
lea edx, [esp + 0x18]
call fcn.00401b27
mov esi, eax
cmp esi, ebx
jge 0x4022b8
cmp dword [esp + 0xc], ebx
jmp 0x40263d
cmp dword [ebp + 0x14], ebx
jne 0x402413
cmp dword [esp + 0x1c], ebx
je 0x402413
lea eax, [esp + 0x10]
push eax
push 0x20006
push ebx
push ebx
push dword [esp + 0x28]
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x402631
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x230]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x402406
cmp eax, 2
jne 0x40271a
test ebx, ebx
je 0x402411
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov ecx, dword [esp + 0x14]
call fcn.00401e97
mov esi, eax
cmp esi, ebx
jmp 0x4022f6
push 0x5c
mov eax, edi
call fcn.004019ca
test eax, eax
pop ecx
jne 0x402735
cmp dword [ebp + 0x10], ebx
je 0x402538
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [esp + 0x10]
push eax
push 0x2001f
push ebx
push edi
push dword [esp + 0x28]
mov dword [esp + 0x24], ebx
call esi
cmp eax, ebx
jne 0x402484
xor eax, eax
cmp dword [esp + 0xc], ebx
je 0x402472
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
mov ebx, dword [esp + 0x10]
mov dword [esp + 0xc], ebx
je 0x402504
jmp 0x402488
mov ebx, dword [esp + 0xc]
and dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push edi
push dword [esp + 0x28]
call esi
xor esi, esi
test eax, eax
jne 0x4024bd
cmp ebx, esi
je 0x4024b1
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, esi
mov ebx, dword [esp + 0x10]
mov dword [esp + 0xc], ebx
je 0x402504
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x14]
push eax
push esi
push 0x2001f
push esi
push esi
push esi
push edi
push dword [esp + 0x38]
mov dword [esp + 0x34], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, esi
jne 0x40273b
xor eax, eax
cmp ebx, esi
je 0x4024f4
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, esi
mov ebx, dword [esp + 0x10]
mov dword [esp + 0xc], ebx
jne 0x40273b
mov ecx, dword [esp + 0x14]
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
cmp word [edi], 0x3d
jne 0x4022b8
mov ecx, dword [esp + 0x14]
push edi
push 0
lea edx, [esp + 0x14]
call fcn.00401b27
jmp 0x4022ae
cmp dword [ebp + 0x14], ebx
jne 0x40257b
lea eax, [esp + 0x10]
push eax
push 0x20019
push ebx
push edi
push dword [esp + 0x28]
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x402575
xor eax, eax
cmp dword [esp + 0xc], ebx
je 0x40256d
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
jmp 0x402583
mov dword [esp + 0x10], 2
cmp dword [esp + 0x10], ebx
je 0x402590
mov dword [ebp + 0x14], 1
push 0xffffffffffffffff
push edi
lea eax, [esp + 0x30]
push 0x104
push eax
call fcn.004073f6
push eax
call fcn.0040104e
mov ecx, dword [esp + 0x28]
add esp, 0x14
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
mov ecx, dword [esp + 0x14]
call fcn.00401e97
mov esi, eax
test esi, esi
jl 0x402638
cmp word [edi], 0x7b
jne 0x40260d
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x40260d
push dword [ebp + 0x14]
mov ecx, dword [esp + 0x18]
push 0
push dword [esp + 0x14]
push edi
call fcn.004021bd
mov esi, eax
test esi, esi
jge 0x4025fc
cmp dword [ebp + 0x14], 0
je 0x402638
mov ecx, dword [esp + 0x14]
mov eax, edi
call fcn.00401a16
mov esi, eax
test esi, esi
jl 0x402638
mov eax, dword [esp + 0x20]
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x10]
cmp eax, 2
je 0x4022fc
xor ebx, ebx
cmp eax, ebx
je 0x402662
cmp dword [esp + 0x20], ebx
jne 0x4022fc
call fcn.00401135
mov esi, eax
cmp dword [esp + 0xc], 0
je 0x402649
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [esp + 0x43c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004076ec
mov esp, ebp
pop ebp
ret 0x10
cmp dword [esp + 0x20], ebx
je 0x4026a5
push dword [esp + 0xc]
call fcn.00401e62
test eax, eax
je 0x4026a5
lea eax, [esp + 0x28]
push eax
call fcn.00401e36
test eax, eax
je 0x4022fc
cmp dword [esp + 0x1c], 0
je 0x4022fc
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x10]
call fcn.0040137a
jmp 0x4022fc
push dword [esp + 0xc]
call fcn.00401e62
cmp dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
je 0x4026ce
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
mov dword [esp + 0xc], ebx
jne 0x402754
cmp dword [esp + 0x1c], ebx
je 0x4022fc
cmp dword [esp + 0x10], 0
jne 0x4022fc
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x402631
jmp 0x4022fc
cmp dword [esp + 0xc], 0
je 0x402710
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x80020009
jmp 0x40264b
call fcn.00401135
test ebx, ebx
mov esi, eax
je 0x402638
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402638
cmp dword [esp + 0xc], ebx
jmp 0x402704
call fcn.00401135
cmp ebx, esi
mov edi, eax
je 0x40274d
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x40264b
call fcn.00401135
jmp 0x40264b