Function at 0x40e666
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 0x40e8ee
cmp dword [ebp + 0xb4], ebx
je 0x40e8ee
cmp dword [ebp + 0xbc], ebx
je 0x40e8ee
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 0x40e8ae
cmp eax, ebx
je 0x40e8ae
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
lea eax, [ebp - 0x74]
push eax
push 0x43ea4c
push 1
push ebx
push 0x43ea3c
setge byte [ebp - 0x5d]
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
mov dword [ebp - 0x68], eax
jl 0x40e765
mov eax, dword [ebp - 0x74]
cmp eax, ebx
je 0x40e765
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 0x40e8b5
cmp dword [ebp - 0x80], ebx
je 0x40e8b5
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 0x40e8b5
push dword [ebp + 0xbc]
push esi
call fcn.0040e115
jmp 0x40e8b5
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 0x40e795
push str.SoftwareClassesSoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push SysReAllocString
jmp 0x40e79f
push str.SoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, ebx
jne 0x40e89e
push 0x3f
pop ecx
mov word [ebp - 0x5c], bx
xor eax, eax
lea edi, [ebp - 0x5a]
rep stosd dword es:[edi], eax
push 0x443fd0
push dword [ebp + 0xbc]
stosw word es:[edi], ax
call fcn.0040dad3
test eax, eax
pop ecx
pop ecx
je 0x40e7df
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 0x40e89e
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 0x40e890
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.0040db36
lea eax, [ebp - 0x78]
push eax
push edi
push dword [ebp + 0xb4]
call fcn.0040db36
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 0x40e89e
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x64], ebx
je 0x40e8b5
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e8b5
mov dword [ebp - 0x68], 0x8007000e
cmp dword [ebp - 0x7c], ebx
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
je 0x40e8c5
push dword [ebp - 0x7c]
call esi
cmp dword [ebp - 0x70], ebx
je 0x40e8cf
push dword [ebp - 0x70]
call esi
mov eax, dword [ebp - 0x74]
cmp eax, ebx
pop edi
pop esi
je 0x40e8de
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp byte [ebp - 0x5d], bl
je 0x40e8e9
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x68]
jmp 0x40e8f3
mov eax, 0x80070057
mov ecx, dword [ebp + 0xa4]
pop ebx
call fcn.0042a57e
add ebp, 0xa8
leave
ret 0x10