Function at 0x408db4
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x40900e
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
lea eax, [ebp - 0xc]
push eax
push 3
push 0
push 0x409020
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x408e3b
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
mov edx, dword [0x40d22c]
call fcn.00403298
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
mov eax, 0x409060
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x2c]
mov ecx, 1
mov al, 0x3e
call fcn.00408070
mov ecx, dword [ebp - 0x24]
mov dl, 1
mov eax, 0x404bc8
call fcn.00405f0c
call fcn.00402e88
xor eax, eax
push ebp
push 0x408fe4
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x1c]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
push 0
mov eax, dword [ebp - 4]
call fcn.004034a4
mov ebx, eax
push ebx
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x408e77
call fcn.00402f28
jmp 0x408feb
mov byte [ebp - 0xd], 0
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x408f2e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x18]
dec eax
je 0x408ea1
sub eax, 2
je 0x408ec3
dec eax
je 0x408ef7
jmp 0x408f24
mov edx, ebx
lea ecx, [ebp - 0x20]
mov eax, dword [ebp - 0xc]
call fcn.0040758c
test al, al
je 0x408f24
mov eax, dword [ebp - 0x20]
call fcn.0040527c
mov dword [ebp - 0x14], eax
mov byte [ebp - 0xd], 1
jmp 0x408f24
cmp dword [ebp - 0x1c], 1
jl 0x408f24
cmp dword [ebp - 0x1c], 4
jg 0x408f24
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.004034a4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x408f24
mov byte [ebp - 0xd], 1
jmp 0x408f24
mov dword [ebp - 0x1c], 4
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.004034a4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x408f24
mov byte [ebp - 0xd], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x408f38
cmp byte [ebp - 0xd], 0
jne 0x408f48
call fcn.00402f28
jmp 0x408feb
dec dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0
jg 0x408f69
mov byte [ebp - 5], 1
mov eax, dword [ebp - 4]
call fcn.004034a4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegDeleteValueA
jmp 0x408fcd
mov eax, dword [ebp - 0x18]
dec eax
je 0x408f79
add eax, 0xfffffffe
sub eax, 2
jb 0x408faf
jmp 0x408fcd
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x14]
call fcn.0040524c
mov eax, dword [ebp - 0x20]
call fcn.004032e0
inc eax
push eax
mov eax, dword [ebp - 0x20]
call fcn.004034a4
push eax
push 1
push 0
mov eax, dword [ebp - 4]
call fcn.004034a4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegSetValueExA
jmp 0x408fcd
push 4
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
push 0
mov eax, dword [ebp - 4]
call fcn.004034a4
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegSetValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408feb
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409015
lea eax, [ebp - 0x30]
call fcn.0040316c
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.0040318c
ret