Function at 0x406ec1
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x225c
call fcn.0041e670
push ebx
mov eax, ecx
xor ecx, ecx
push esi
mov ebx, ecx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x5c], ecx
push edi
mov ecx, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407417
push 0x7d
pop eax
cmp word [edi], ax
je 0x407408
xor eax, eax
push str.Delete
inc eax
push edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
neg eax
push str.ForceRemove
sbb ebx, ebx
push edi
inc ebx
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
je 0x406f46
test ebx, ebx
je 0x406fef
mov ecx, dword [esp + 0x10]
push edi
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x406ff1
push 0x5c
pop edx
mov ecx, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
call fcn.00406491
test eax, eax
jne 0x407403
push edi
call fcn.00406a86
test eax, eax
je 0x406fb2
mov eax, dword [ebp + 0xc]
push edi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call fcn.00406b71
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
test ebx, ebx
je 0x406fe9
mov ebx, dword [esp + 0x10]
push edi
mov ecx, ebx
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
push edi
mov ecx, ebx
call fcn.00406a35
mov esi, eax
test esi, esi
js 0x407408
xor eax, eax
mov dword [esp + 0x2c], eax
jmp 0x407375
mov dword [esp + 0x2c], esi
jmp 0x406ff1
xor esi, esi
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
mov ebx, dword [esp + 0x10]
test eax, eax
jne 0x40701b
push edi
mov ecx, ebx
mov dword [esp + 0x28], esi
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
push 0x43e07c
push edi
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
jne 0x40712c
lea eax, [esp + 0x268]
push eax
mov ecx, ebx
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
push edi
mov ecx, ebx
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
push 0x3d
pop eax
cmp word [edi], ax
jne 0x407403
cmp dword [ebp + 0x10], 0
je 0x4070b3
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x40], eax
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
push edi
lea eax, [esp + 0x26c]
push eax
lea eax, [esp + 0x48]
push eax
mov ecx, ebx
call fcn.00406680
xor ecx, ecx
mov esi, eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
test esi, esi
js 0x407408
mov dword [esp + 0x44], ecx
jmp 0x407375
cmp dword [ebp + 0x14], 0
jne 0x40711f
cmp dword [esp + 0x24], 0
je 0x40711f
xor esi, esi
push 0x20006
push esi
push dword [ebp + 0xc]
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
call fcn.00406b15
test eax, eax
jne 0x4073e7
mov ebx, dword [esp + 0x34]
lea eax, [esp + 0x268]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x407108
cmp eax, 2
jne 0x4073d7
test ebx, ebx
je 0x407117
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x34], esi
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x38], esi
push edi
mov ecx, ebx
call fcn.00406a35
jmp 0x4073cc
push 0x5c
pop edx
mov ecx, edi
call fcn.00406491
test eax, eax
jne 0x407403
cmp dword [ebp + 0x10], eax
je 0x4071c1
mov esi, dword [ebp + 0xc]
push 0x2001f
push edi
push esi
lea ecx, [esp + 0x20]
call fcn.00406b15
test eax, eax
je 0x407184
push 0x20019
push edi
push esi
lea ecx, [esp + 0x20]
call fcn.00406b15
test eax, eax
je 0x407184
sub esp, 0x14
lea ecx, [esp + 0x28]
push edi
push esi
call fcn.00406530
test eax, eax
jne 0x4072af
push edi
mov ecx, ebx
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
push 0x3d
pop eax
cmp word [edi], ax
jne 0x407375
push edi
xor eax, eax
push eax
lea eax, [esp + 0x1c]
push eax
mov ecx, ebx
call fcn.00406680
mov esi, eax
test esi, esi
js 0x407408
jmp 0x407375
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x4071dc
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [esp + 0x20]
call fcn.00406b15
jmp 0x4071df
push 2
pop eax
push 1
test eax, eax
mov dword [esp + 0x24], eax
pop eax
push 0xffffffffffffffff
cmovne esi, eax
push edi
lea eax, [esp + 0x68]
push 0x104
push eax
mov dword [ebp + 0x14], esi
call fcn.0040fb9c
push eax
call fcn.004069fd
add esp, 0x14
mov ecx, ebx
push edi
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
push edi
mov ecx, ebx
call fcn.00406a35
mov esi, eax
test esi, esi
js 0x407408
push 0x7b
pop eax
cmp word [edi], ax
jne 0x40728b
mov ecx, edi
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40723c
sub ecx, edx
xor eax, eax
sar ecx, 1
inc eax
cmp ecx, eax
jne 0x40728b
push dword [ebp + 0x14]
mov ecx, dword [esp + 0x14]
push ebx
mov ebx, dword [esp + 0x1c]
push ebx
push edi
call fcn.00406ec1
mov esi, eax
test esi, esi
jns 0x407275
cmp dword [ebp + 0x14], 0
je 0x407408
mov ecx, dword [esp + 0x10]
push edi
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
jmp 0x40728f
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x5c]
mov dword [ebp + 0x14], ecx
cmp eax, 2
je 0x406f0a
test eax, eax
je 0x4072bd
test ecx, ecx
jne 0x406f0a
mov ecx, eax
call fcn.00406d75
mov esi, eax
jmp 0x407408
test ecx, ecx
je 0x4072fb
push ebx
call fcn.00406c5f
test eax, eax
je 0x4072fb
lea eax, [esp + 0x60]
push eax
call fcn.00406a86
test eax, eax
je 0x406f0a
cmp dword [esp + 0x24], 0
je 0x406f0a
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x18]
call fcn.00406b71
jmp 0x406f0a
push ebx
call fcn.00406c5f
mov ecx, eax
xor edx, edx
mov dword [esp + 0x20], ecx
mov eax, edx
test ebx, ebx
je 0x407320
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x20]
xor edx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
test eax, eax
jne 0x4072af
cmp dword [esp + 0x24], eax
je 0x406f0a
test ecx, ecx
jne 0x406f0a
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], edx
call fcn.00406cfd
xor ecx, ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ecx
test eax, eax
jne 0x4072af
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x50], ecx
cmp dword [ebp + 0x10], 0
je 0x406f0a
push 0x7b
pop eax
cmp word [edi], ax
jne 0x406f0a
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x58]
jne 0x407390
sub ecx, edx
xor eax, eax
sar ecx, 1
inc eax
cmp ecx, eax
jne 0x406f0a
xor eax, eax
push eax
push dword [ebp + 0x10]
mov ecx, ebx
push dword [esp + 0x1c]
push edi
call fcn.00406ec1
mov esi, eax
test esi, esi
js 0x407408
push edi
mov ecx, ebx
call fcn.00406d83
mov esi, eax
test esi, esi
js 0x407408
jmp 0x406f0a
mov ecx, eax
call fcn.00406d75
mov esi, eax
test ebx, ebx
je 0x407408
push ebx
jmp 0x4073fb
mov ecx, eax
call fcn.00406d75
cmp dword [esp + 0x34], 0
mov esi, eax
je 0x407408
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407408
mov esi, 0x80020009
mov eax, dword [esp + 0x14]
test eax, eax
je 0x407417
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10