Function at 0x40e52f
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0xa8]
sub esp, 0x128
mov eax, dword [0x44c750]
push ebx
xor ebx, ebx
cmp dword [ebp + 0xb0], ebx
mov dword [ebp + 0xa4], eax
mov byte [ebp - 0x5d], bl
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x74], ebx
je 0x40e7b7
cmp dword [ebp + 0xb4], ebx
je 0x40e7b7
cmp dword [ebp + 0xbc], ebx
je 0x40e7b7
push esi
push edi
push dword [ebp + 0xb0]
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
call edi
push dword [ebp + 0xb4]
mov esi, eax
mov dword [ebp - 0x7c], esi
call edi
cmp esi, ebx
mov dword [ebp - 0x70], eax
je 0x40e777
cmp eax, ebx
je 0x40e777
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
lea eax, [ebp - 0x74]
push eax
push 0x43e9ac
push 1
push ebx
push 0x43e99c
setge byte [ebp - 0x5d]
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
mov dword [ebp - 0x68], eax
jl 0x40e62e
mov eax, dword [ebp - 0x74]
cmp eax, ebx
je 0x40e62e
mov ecx, dword [eax]
lea edx, [ebp - 0x80]
push edx
push esi
push eax
call dword [ecx + 0x18]
cmp eax, ebx
mov dword [ebp - 0x68], eax
jl 0x40e77e
cmp dword [ebp - 0x80], ebx
je 0x40e77e
push dword [ebp + 0xbc]
mov eax, dword [ebp - 0x74]
push dword [ebp + 0xb8]
mov ecx, dword [eax]
push dword [ebp - 0x70]
push esi
push eax
call dword [ecx + 0xc]
cmp eax, ebx
mov dword [ebp - 0x68], eax
jge 0x40e77e
push dword [ebp + 0xbc]
push esi
call fcn.0040dfde
jmp 0x40e77e
cmp dword [ebp + 0xb8], 2
lea eax, [ebp + 0xb8]
push eax
lea eax, [ebp - 0x64]
push eax
push ebx
mov esi, 0x20006
push esi
push ebx
push ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x6c], ebx
push ebx
jne 0x40e65e
push str.SoftwareClassesSoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push SysReAllocString
jmp 0x40e668
push str.SoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, ebx
jne 0x40e767
push 0x3f
pop ecx
mov word [ebp - 0x5c], bx
xor eax, eax
lea edi, [ebp - 0x5a]
rep stosd dword es:[edi], eax
push 0x443ed8
push dword [ebp + 0xbc]
stosw word es:[edi], ax
call fcn.0040d99c
test eax, eax
pop ecx
pop ecx
je 0x40e6a8
push dword [ebp + 0xbc]
call dword [sym.imp.ole32.dll_CoCreateGuid]
push 0x80
lea eax, [ebp - 0x5c]
push eax
push dword [ebp + 0xbc]
call dword [sym.imp.ole32.dll_StringFromGUID2]
cmp eax, ebx
mov dword [ebp - 0x68], eax
jl 0x40e767
lea eax, [ebp + 0xb8]
push eax
lea eax, [ebp - 0x6c]
push eax
push ebx
push esi
push ebx
push ebx
push ebx
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40e759
lea eax, [ebp + 0xbc]
push eax
mov edi, 0x104
push edi
push dword [ebp + 0xb0]
mov dword [ebp + 0xbc], ebx
mov dword [ebp - 0x78], ebx
call fcn.0040d9ff
lea eax, [ebp - 0x78]
push eax
push edi
push dword [ebp + 0xb4]
call fcn.0040d9ff
mov eax, dword [ebp + 0xbc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0xb0]
push 1
push ebx
push str.GDFBinaryPath
push dword [ebp - 0x6c]
call edi
mov eax, dword [ebp - 0x78]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0xb4]
push 1
push ebx
push str.GameInstallPath
push dword [ebp - 0x6c]
call edi
cmp dword [ebp - 0x6c], ebx
je 0x40e767
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x64], ebx
je 0x40e77e
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e77e
mov dword [ebp - 0x68], 0x8007000e
cmp dword [ebp - 0x7c], ebx
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
je 0x40e78e
push dword [ebp - 0x7c]
call esi
cmp dword [ebp - 0x70], ebx
je 0x40e798
push dword [ebp - 0x70]
call esi
mov eax, dword [ebp - 0x74]
cmp eax, ebx
pop edi
pop esi
je 0x40e7a7
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp byte [ebp - 0x5d], bl
je 0x40e7b2
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x68]
jmp 0x40e7bc
mov eax, 0x80070057
mov ecx, dword [ebp + 0xa4]
pop ebx
call fcn.0042a0fe
add ebp, 0xa8
leave
ret 0x10