Function at 0x40e0be
Capabilities:
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0xa8]
sub esp, 0x128
mov eax, dword [0x44a750]
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 0x40e346
cmp dword [ebp + 0xb4], ebx
je 0x40e346
cmp dword [ebp + 0xbc], ebx
je 0x40e346
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 0x40e306
cmp eax, ebx
je 0x40e306
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
lea eax, [ebp - 0x74]
push eax
push 0x43d95c
push 1
push ebx
push 0x43d94c
setge byte [ebp - 0x5d]
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
mov dword [ebp - 0x68], eax
jl 0x40e1bd
mov eax, dword [ebp - 0x74]
cmp eax, ebx
je 0x40e1bd
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 0x40e30d
cmp dword [ebp - 0x80], ebx
je 0x40e30d
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 0x40e30d
push dword [ebp + 0xbc]
push esi
call fcn.0040db6d
jmp 0x40e30d
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 0x40e1ed
push str.SoftwareClassesSoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push SysReAllocString
jmp 0x40e1f7
push str.SoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, ebx
jne 0x40e2f6
push 0x3f
pop ecx
mov word [ebp - 0x5c], bx
xor eax, eax
lea edi, [ebp - 0x5a]
rep stosd dword es:[edi], eax
push 0x442e30
push dword [ebp + 0xbc]
stosw word es:[edi], ax
call fcn.0040d52b
test eax, eax
pop ecx
pop ecx
je 0x40e237
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 0x40e2f6
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 0x40e2e8
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.0040d58e
lea eax, [ebp - 0x78]
push eax
push edi
push dword [ebp + 0xb4]
call fcn.0040d58e
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 0x40e2f6
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x64], ebx
je 0x40e30d
push dword [ebp - 0x64]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e30d
mov dword [ebp - 0x68], 0x8007000e
cmp dword [ebp - 0x7c], ebx
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
je 0x40e31d
push dword [ebp - 0x7c]
call esi
cmp dword [ebp - 0x70], ebx
je 0x40e327
push dword [ebp - 0x70]
call esi
mov eax, dword [ebp - 0x74]
cmp eax, ebx
pop edi
pop esi
je 0x40e336
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp byte [ebp - 0x5d], bl
je 0x40e341
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x68]
jmp 0x40e34b
mov eax, 0x80070057
mov ecx, dword [ebp + 0xa4]
pop ebx
call fcn.0042954e
add ebp, 0xa8
leave
ret 0x10