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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x427c9d
push eax
mov dword fs:[0], esp
sub esp, 0x82c
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
push ebp
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push edi
mov ebp, 0x434150
or edi, 0xffffffff
jmp 0x406170
push 0x42ba34
lea ecx, [esp + 0x14]
call fcn.00404f60
mov ecx, dword [ebp]
test ecx, ecx
mov dword [esp + 0x844], 0
jne 0x406194
xor eax, eax
jmp 0x4061ac
mov eax, ecx
lea edi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4061a0
sub eax, edi
or edi, 0xffffffff
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00402180
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
push 0x80000002
call ebx
mov edx, dword [esp + 0x14]
push str.GameFullPath
push edx
call esi
mov eax, dword [esp + 0x14]
push str.GameUninstall
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x844], edi
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40620f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
add ebp, 4
cmp ebp, 0x434350
jl 0x406170
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [esp + 0x10], 0
mov ebp, 1
mov esi, dword [esp + 0x10]
mov eax, dword [esi*4 + 0x434350]
push eax
lea ecx, [esp + 0x24]
call fcn.00404f60
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x28]
push ecx
push ebp
push 0
push edx
inc esi
push 0x80000002
mov dword [esp + 0x858], ebp
mov dword [esp + 0x24], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406687
call fcn.004197bc
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
push 0x4296dc
lea ecx, [esp + 0x20]
mov byte [esp + 0x848], 2
call fcn.00404f60
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x440]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push str.UninstallString
push eax
mov byte [esp + 0x85c], 3
mov dword [esp + 0x30], 0x400
call ebx
test eax, eax
jne 0x406302
cmp dword [esp + 0x24], ebp
jne 0x406302
mov eax, dword [esp + 0x18]
test eax, eax
je 0x406302
lea eax, [esp + 0x43c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4062e7
sub eax, edx
push eax
lea ecx, [esp + 0x440]
push ecx
lea ecx, [esp + 0x24]
call fcn.004020e0
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0
push str.InstallLocation
push edx
mov dword [esp + 0x30], 0x400
call ebx
test eax, eax
jne 0x40635c
cmp dword [esp + 0x24], ebp
jne 0x4066d2
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4066d2
lea eax, [esp + 0x3c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406348
sub eax, edx
push eax
lea eax, [esp + 0x40]
push eax
jmp 0x4063db
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push str.UninstallString
push eax
call ebx
test eax, eax
jne 0x4066d2
cmp dword [esp + 0x24], ebp
jne 0x4066d2
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4066d2
lea ecx, [esp + 0x3c]
push 0x22
push ecx
call fcn.0040aaf0
lea edx, [esp + 0x44]
push 0x22
push edx
mov byte [eax], 0
call fcn.0040aaf0
mov esi, eax
inc esi
push 0x5c
push esi
call fcn.0040aaf0
add esp, 0x18
test esi, esi
mov byte [eax], 0
jne 0x4063cb
xor eax, eax
jmp 0x4063d9
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4063d0
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x1c]
call fcn.004020e0
mov eax, dword [esp + 0x10]
mov eax, dword [eax*4 + 0x434350]
test eax, eax
je 0x406624
mov ebp, dword [esp + 0x14]
add ebp, 0xfffffff0
lea ebx, [ebp + 0xc]
push eax
lea ecx, [esp + 0x3c]
call fcn.00404f60
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp]
inc edx
mov dword [esp + 0x10], edx
mov edx, dword [ecx]
mov byte [esp + 0x844], 4
call dword [edx + 0x10]
cmp dword [ebx], 0
jl 0x40643b
cmp eax, dword [ebp]
jne 0x40643b
mov eax, ebp
mov ecx, 1
lock xadd dword [ebx], ecx
jmp 0x40646d
mov ecx, dword [ebp + 4]
mov edx, dword [eax]
push 1
push ecx
mov ecx, eax
call dword [edx]
test eax, eax
je 0x406721
mov edx, dword [ebp + 4]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 4]
inc ecx
mov edx, ecx
shr ecx, 2
lea esi, [ebp + 0x10]
lea edi, [eax + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, 0x10
mov dword [esp + 0x2c], eax
push 1
push 0x4296e0
lea ecx, [esp + 0x34]
mov byte [esp + 0x84c], 5
call fcn.00402180
mov eax, dword [esp + 0x10]
mov ecx, dword [eax*4 + 0x434350]
test ecx, ecx
jne 0x40649f
xor eax, eax
jmp 0x4064ad
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4064a4
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x34]
call fcn.00402180
mov esi, dword [esp + 0x2c]
push 0x42b9f0
push esi
call fcn.0040a754
add esp, 8
test eax, eax
je 0x4065c0
push eax
call fcn.0040a572
add esp, 4
push 0x42ba34
lea ecx, [esp + 0x38]
call fcn.00404f60
mov eax, dword [esp + 0x38]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x84c], 6
call fcn.00402180
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x30]
push ecx
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test esi, esi
jne 0x406520
xor eax, eax
jmp 0x40652e
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406525
sub eax, edx
push eax
mov eax, dword [esp + 0x34]
push esi
push 1
push 0
push str.GameFullPath
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 0x1c]
push 0x4296dc
push ecx
call fcn.00409f8c
add esp, 8
test eax, eax
je 0x40658f
mov edx, dword [esp + 0x1c]
test edx, edx
jne 0x406566
xor eax, eax
jmp 0x406579
mov eax, edx
lea edi, [eax + 1]
jmp 0x406570
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406570
sub eax, edi
push eax
push edx
mov edx, dword [esp + 0x38]
push 1
push 0
push str.GameUninstall
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x844], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4065c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov edx, dword [esp + 0x10]
inc edx
lea eax, [esi - 0x10]
mov dword [esp + 0x10], edx
mov byte [esp + 0x844], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4065eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov byte [esp + 0x844], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406611
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax*4 + 0x434350]
test eax, eax
jne 0x406401
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edi, 0xffffffff
mov byte [esp + 0x844], 2
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406657
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x844], 1
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40667c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebp, 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x844], edi
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4066ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
cmp dword [esp + 0x10], 0x122
jl 0x406231
mov ecx, dword [esp + 0x83c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x838
ret
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x844], 2
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4066f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov byte [esp + 0x844], 1
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406687
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x406687
jmp fcn.00401cb0