Function at 0x4995d8
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 5], cl
mov esi, edx
xor edx, edx
push ebp
push 0x49988d
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
push 0
push 0
push 3
push 0
lea edx, [ebp - 0xc]
push edx
lea edx, [ebp - 0x10]
push edx
mov ecx, 0x49989c
mov edx, 0x80000002
call fcn.00494530
mov ebx, eax
test ebx, ebx
je 0x4996cb
lea eax, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x38]
mov eax, 0x80000002
call fcn.004984ec
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
mov eax, 0x499914
mov dword [ebp - 0x30], eax
lea edx, [ebp - 0x34]
mov ecx, 1
mov al, 0x44
call fcn.00496dcc
push dword [ebp - 0x2c]
push 0x49998c
lea eax, [ebp - 0x3c]
push eax
mov eax, 0x4999a4
mov dword [ebp - 0x48], eax
lea edx, [ebp - 0x4c]
mov eax, ebx
call fcn.0040ce14
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x44], eax
lea edx, [ebp - 0x50]
mov eax, ebx
call fcn.004950c4
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
lea edx, [ebp - 0x48]
mov ecx, 2
mov al, 0x3b
call fcn.00496dcc
push dword [ebp - 0x3c]
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.004069f8
mov ecx, dword [ebp - 0x28]
mov dl, 1
mov eax, dword [0x40a9c0]
call fcn.004117f4
call fcn.00404a74
mov eax, esi
call fcn.004064d4
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], 4
xor eax, eax
push ebp
push 0x4997b3
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x14]
push eax
push 0
lea eax, [ebp - 0x1c]
push eax
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x4997a9
mov eax, dword [ebp - 0x1c]
dec eax
je 0x499723
sub eax, 2
je 0x499749
dec eax
je 0x499780
jmp 0x4997a9
lea ecx, [ebp - 4]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0xc]
call fcn.00494490
test al, al
je 0x4997a9
mov eax, dword [ebp - 4]
call fcn.0040d070
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], 1
jmp 0x4997a9
cmp dword [ebp - 0x14], 1
jb 0x4997a9
cmp dword [ebp - 0x14], 4
ja 0x4997a9
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
je 0x499777
call fcn.004117e0
mov dword [ebp - 0x20], 3
jmp 0x4997a9
mov dword [ebp - 0x14], 4
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
je 0x4997a9
call fcn.004117e0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4997c2
cmp dword [ebp - 0x18], 0
jge 0x4997cd
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
sete al
and al, byte [ebp - 5]
je 0x4997dc
inc dword [ebp - 0x18]
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
dec eax
je 0x4997ef
add eax, 0xfffffffe
sub eax, 2
jb 0x49982e
jmp 0x499847
mov eax, dword [ebp - 0x18]
xor edx, edx
push edx
push eax
lea eax, [ebp - 4]
call fcn.0040d020
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x49980a
sub ebx, 4
mov ebx, dword [ebx]
inc ebx
mov eax, ebx
add eax, eax
push eax
mov eax, dword [ebp - 4]
call fcn.004064d4
push eax
mov eax, dword [ebp - 0x20]
push eax
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegSetValueExW
jmp 0x499847
push 4
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x20]
push eax
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegSetValueExW
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x499894
lea eax, [ebp - 0x50]
mov edx, 2
call fcn.00406440
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.00406440
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00406440
lea eax, [ebp - 4]
call fcn.00406438
ret