Function at 0x40dc1e
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
mov eax, 0x457a9c
call fcn.00420870
sub esp, 0x134
push ebx
push esi
push edi
push dword [0x46f5bc]
call fcn.00420c20
push dword [ebp + 8]
mov esi, eax
call fcn.00420c20
add esi, eax
pop ecx
cmp esi, 0x104
pop ecx
jae 0x40dc6f
push dword [ebp + 8]
lea eax, [ebp - 0x140]
push dword [0x46f5bc]
push 0x46f698
push eax
call fcn.00420a7c
add esp, 0x10
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
push 4
xor ebx, ebx
mov dword [edi], 1
mov dword [eax], 3
pop eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x10]
push eax
push 0xf003f
lea eax, [ebp - 0x140]
push ebx
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40de30
lea eax, [ebp - 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [0x46f5c4]
push dword [ebp - 0x10]
call esi
test eax, eax
jne 0x40de27
mov eax, dword [ebp - 0x18]
xor ecx, ecx
cmp eax, 2
sete cl
inc ecx
neg eax
sbb eax, eax
and eax, ecx
mov dword [edi], eax
push dword [0x46f5c4]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
xor eax, eax
cmp dword [edi], ebx
mov edi, dword [ebp + 0x10]
setne al
lea eax, [eax + eax + 1]
mov dword [edi], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [0x46f5c0]
push dword [ebp - 0x10]
call esi
cmp eax, ebx
jne 0x40dd4e
xor eax, eax
cmp dword [ebp - 0x18], ebx
je 0x40dd3d
inc eax
cmp dword [ebp - 0x18], eax
je 0x40dd3d
xor eax, eax
cmp dword [ebp - 0x18], 2
setne al
inc eax
inc eax
mov dword [edi], eax
push dword [0x46f5c0]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push eax
lea eax, [ebp - 0x1c]
push ebx
push eax
push ebx
mov dword [ebp - 0x1c], 3
push dword [0x46f5c8]
push dword [ebp - 0x10]
call esi
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jbe 0x40de27
inc eax
push eax
call fcn.0044164d
mov edi, eax
pop ecx
cmp edi, ebx
je 0x40de18
mov eax, dword [ebp - 0x14]
inc eax
push eax
push ebx
push edi
call fcn.00420ad0
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push edi
push eax
push ebx
push dword [0x46f5c8]
push dword [ebp - 0x10]
call esi
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.004018d7
push edi
call fcn.00420c20
pop ecx
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.0040190f
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.004029ce
pop ecx
pop ecx
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.004018d7
mov eax, dword [ebp - 0x38]
cmp eax, ebx
jne 0x40ddfa
mov eax, 0x45ba98
mov ecx, dword [ebp + 0x14]
push eax
call fcn.00444beb
push edi
call fcn.00441676
or dword [ebp - 4], 0xffffffff
pop ecx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004018d7
push dword [0x46f5c8]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
pop esi
inc eax
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10