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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
xor edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4a20d8
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
xor eax, eax
mov dword [ebp - 0x1c], eax
push 0
mov eax, dword [ebp - 4]
add eax, 4
push eax
push 0
push 3
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
call fcn.004072c8
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
call sub.advapi32.dll_RegCreateKeyExW
test eax, eax
jne 0x4a20bd
xor eax, eax
push ebp
push 0x4a20b2
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 0
je 0x4a2098
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 1
jne 0x4a1f36
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.004072c8
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
jne 0x4a1f36
cmp dword [ebp - 0x18], 2
jne 0x4a1f36
mov eax, dword [ebp - 4]
mov dword [eax + 8], 2
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 7
jne 0x4a1f74
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0
je 0x4a1f74
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
call fcn.00406acc
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x14]
cmp word [edx + eax*2 - 2], 0
je 0x4a1f74
mov eax, dword [ebp - 4]
add eax, 0x14
mov edx, 0x4a20f4
call fcn.00407460
mov eax, dword [ebp - 4]
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 0xffffffff
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
dec eax
sub eax, 2
jb 0x4a1f91
sub eax, 4
jne 0x4a1fb0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
call fcn.004072c8
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
call fcn.00406acc
inc eax
add eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 4
jne 0x4a1fdd
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
call fcn.0041d82c
test al, al
jne 0x4a1fd0
xor eax, eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 4
mov eax, dword [ebp - 4]
cmp dword [eax + 8], 3
jne 0x4a205e
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
call fcn.00409d74
mov eax, dword [ebp - 0x14]
call fcn.00406ad8
mov edx, eax
sar edx, 1
jns 0x4a2005
adc edx, 0
lea eax, [ebp - 0x10]
xor ecx, ecx
call fcn.0040706c
mov eax, dword [ebp - 0x10]
call fcn.00406ad8
push eax
mov eax, dword [ebp - 0x10]
call fcn.00406f2c
push eax
mov eax, dword [ebp - 0x14]
call fcn.00406f2c
pop edx
pop ecx
call fcn.0042a910
mov edx, eax
lea eax, [ebp - 0x10]
xor ecx, ecx
call fcn.0040706c
mov eax, dword [ebp - 0x10]
call fcn.00406ad8
test eax, eax
jle 0x4a2053
lea eax, [ebp - 0x10]
call fcn.00406b9c
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
call fcn.00406ad8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jl 0x4a2098
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.004072c8
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegSetValueExW
test eax, eax
je 0x4a2098
call fcn.00405de4
jmp 0x4a20bd
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a20b9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a20df
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00406688
ret