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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4902a6
mov eax, dword fs:[0]
push eax
sub esp, 0x438
mov eax, dword [0x4b0b28]
xor eax, esp
mov dword [esp + 0x430], eax
push ebx
push esi
push edi
mov eax, dword [0x4b0b28]
xor eax, esp
push eax
lea eax, [esp + 0x448]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ebx
mov edx, dword [ebp + 0x14]
mov eax, edi
mov dword [esp + 0x450], ebx
mov dword [esp + 0x28], edx
call fcn.00405020
mov esi, eax
cmp esi, ebx
jl 0x405645
cmp word [edi], 0x7d
je 0x405643
lea ecx, [ecx]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x49c898
push edi
mov dword [esp + 0x2c], 1
call esi
mov ebx, eax
neg ebx
push 0x49c864
sbb ebx, ebx
push edi
add ebx, 1
call esi
test eax, eax
je 0x405223
test ebx, ebx
je 0x40531f
mov ecx, dword [esp + 0x1c]
mov eax, edi
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
cmp dword [ebp + 0x10], 0
je 0x40531f
movzx ecx, word [edi]
test cx, cx
mov eax, edi
je 0x40526e
movzx ecx, cx
cmp cx, 0x5c
je 0x405266
push eax
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [eax]
test cx, cx
jne 0x40524f
jmp 0x40526e
test eax, eax
jne 0x40570d
mov esi, 0x49cb0c
mov eax, dword [esi]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40529e
add esi, 4
cmp esi, 0x49cb3c
jl 0x405273
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
push edi
lea ecx, [esp + 0x18]
call fcn.00405dd0
test ebx, ebx
je 0x40531f
mov ecx, dword [esp + 0x1c]
mov eax, edi
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
mov ecx, dword [esp + 0x1c]
call fcn.00405d20
mov esi, eax
test esi, esi
jl 0x405634
cmp word [edi], 0x7b
jne 0x405310
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x405310
mov eax, dword [ebp + 0x10]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
push 0
push eax
push ecx
push edi
mov ecx, ebx
call fcn.00405170
mov esi, eax
test esi, esi
jl 0x405634
mov eax, edi
mov ecx, ebx
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
cmp word [edi], 0x7d
jne 0x4051f0
jmp 0x405634
push 0x49c880
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405348
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
mov eax, edi
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
mov ebx, dword [esp + 0x1c]
push 0x49c858
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x405447
lea eax, [esp + 0x234]
mov ecx, ebx
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
mov eax, edi
mov ecx, ebx
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
cmp word [edi], 0x3d
jne 0x40570d
cmp dword [ebp + 0x10], 0
je 0x4053d8
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x234]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x454], 1
mov dword [esp + 0x18], edx
push ecx
mov ecx, edi
mov edx, ebx
call fcn.004057a0
mov esi, eax
test esi, esi
jl 0x405634
mov byte [esp + 0x450], 0
jmp 0x4052ca
cmp dword [ebp + 0x14], 0
jne 0x405439
cmp dword [esp + 0x24], 0
je 0x405439
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x14]
push edx
push 0x20006
push 0
push 0
push eax
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40562d
mov ebx, dword [esp + 0x14]
lea ecx, [esp + 0x234]
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x40542e
cmp eax, 2
jne 0x405726
test ebx, ebx
je 0x405439
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x1c]
call fcn.00405d20
jmp 0x405306
movzx ecx, word [edi]
test cx, cx
mov eax, edi
je 0x405473
movzx ecx, cx
cmp cx, 0x5c
je 0x40546b
push eax
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [eax]
test cx, cx
jne 0x405454
jmp 0x405473
test eax, eax
jne 0x40570d
cmp dword [ebp + 0x10], 0
je 0x40553f
mov ebx, dword [esp + 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea edx, [esp + 0x14]
push edx
push 0x2001f
push 0
push edi
push ebx
mov dword [esp + 0x28], 0
call esi
test eax, eax
jne 0x4054be
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x4054b2
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], ecx
je 0x405509
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
push edi
push ebx
mov dword [esp + 0x28], 0
call esi
test eax, eax
jne 0x4054f5
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x4054e9
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], ecx
je 0x405509
push ebx
mov edx, edi
lea esi, [esp + 0x1c]
call fcn.00405750
test eax, eax
jne 0x40562d
mov ebx, dword [esp + 0x1c]
mov eax, edi
mov ecx, ebx
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
cmp word [edi], 0x3d
jne 0x4052ca
push 0
lea edx, [esp + 0x1c]
push edx
mov ecx, edi
mov edx, ebx
call fcn.004057a0
jmp 0x4052c0
cmp dword [ebp + 0x14], 0
jne 0x40566b
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push edi
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405584
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x40557c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
test eax, eax
mov dword [esp + 0x14], eax
je 0x405593
mov dword [ebp + 0x14], 1
push 0xffffffffffffffff
push edi
lea eax, [esp + 0x34]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_wcsncpy_s]
push eax
call fcn.004046d0
add esp, 0x14
mov eax, edi
mov ecx, ebx
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
mov ecx, ebx
call fcn.00405d20
mov esi, eax
test esi, esi
jl 0x405634
cmp word [edi], 0x7b
jne 0x40560b
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x40560b
mov ecx, dword [ebp + 0x14]
mov edx, dword [esp + 0x18]
push ecx
push 0
push edx
push edi
mov ecx, ebx
call fcn.00405170
mov esi, eax
test esi, esi
jge 0x4055fc
cmp dword [ebp + 0x14], 0
je 0x405634
mov eax, edi
mov ecx, ebx
call fcn.00405020
mov esi, eax
test esi, esi
jl 0x405634
mov ecx, dword [esp + 0x14]
cmp ecx, 2
mov eax, dword [esp + 0x28]
mov dword [ebp + 0x14], eax
je 0x405310
test ecx, ecx
je 0x405678
test eax, eax
jne 0x405310
mov eax, ecx
call fcn.00405f80
mov esi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x405643
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [esp + 0x448]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x430]
xor ecx, esp
call fcn.0046b7d6
mov esp, ebp
pop ebp
ret 0x10
mov dword [esp + 0x14], 2
jmp 0x40558c
test eax, eax
mov ebx, dword [esp + 0x18]
je 0x4056b8
mov ecx, ebx
call fcn.00405f20
test eax, eax
je 0x4056b8
lea ebx, [esp + 0x2c]
call fcn.00405d90
test eax, eax
je 0x405310
cmp dword [esp + 0x24], 0
je 0x405310
mov eax, ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00405dd0
jmp 0x405310
mov ecx, ebx
call fcn.00405f20
test ebx, ebx
mov dword [esp + 0x14], eax
je 0x4056da
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
mov dword [esp + 0x18], 0
jne 0x405741
cmp dword [esp + 0x24], 0
je 0x405310
cmp dword [esp + 0x14], 0
jne 0x405310
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x2c]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x40562d
jmp 0x405310
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40571c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x80020009
jmp 0x405645
call fcn.00405f80
test ebx, ebx
mov esi, eax
je 0x405634
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405634
call fcn.00405f80
jmp 0x405645