Function at 0x40e115
Capabilities:
Connect to wmi namespace via wbemlocator
Reference sql statements

Disassembly:
push ebp
mov eax, 0x1834
lea ebp, [esp - 0x17b4]
call fcn.0042a510
mov eax, dword [0x44c750]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
mov dword [ebp + 0x17b0], eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x6c], ebx
mov byte [ebp - 0x51], bl
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
lea eax, [ebp - 0x68]
push eax
push 0x43ec94
push 1
push ebx
push 0x43ec84
setge byte [ebp - 0x59]
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40e2fe
cmp dword [ebp - 0x68], ebx
je 0x40e30e
mov esi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push str.._rootcimv2ApplicationsGames
call esi
lea edx, [ebp - 0x60]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x68]
mov ecx, dword [eax]
push ebx
push dword [ebp - 0x70]
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x40e2e0
cmp dword [ebp - 0x60], ebx
je 0x40e2e0
push ebx
push ebx
push 3
push 3
push ebx
push ebx
push 0xa
push dword [ebp - 0x60]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
push 0x43ec34
call esi
mov ecx, dword [ebp + 0x17bc]
mov dword [ebp - 0x64], eax
xor eax, eax
cmp word [ecx], bx
je 0x40e204
mov edx, ecx
cmp eax, 0x7d0
jg 0x40e204
mov cx, word [edx]
cmp cx, 0x5c
mov word [ebp + eax*2 + 0x7b0], cx
jne 0x40e1fc
inc eax
mov word [ebp + eax*2 + 0x7b0], cx
inc eax
inc edx
inc edx
cmp word [edx], bx
jne 0x40e1db
mov word [ebp + eax*2 + 0x7b0], bx
lea eax, [ebp + 0x7b0]
push eax
push str.SELECT__FROM_GAME_WHERE_GDFBinaryPath____s_
lea eax, [ebp - 0x50]
push 0x400
push eax
call fcn.0040df54
add esp, 0x10
lea eax, [ebp - 0x50]
push eax
call esi
mov ecx, dword [ebp - 0x60]
mov edx, dword [ecx]
lea edi, [ebp - 0x6c]
push edi
push ebx
push 0x30
push eax
push dword [ebp - 0x64]
push ecx
call dword [edx + 0x50]
test eax, eax
jl 0x40e2d0
mov eax, dword [ebp - 0x6c]
lea edx, [ebp - 0x64]
push edx
lea edx, [ebp - 0x58]
push edx
push 1
push 0x1388
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x64], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40e2c3
cmp dword [ebp - 0x64], ebx
je 0x40e2c3
cmp dword [ebp - 0x58], ebx
je 0x40e2d0
push str.InstanceID
call esi
push ebx
push ebx
lea edx, [ebp - 0x80]
push edx
mov esi, eax
mov eax, dword [ebp - 0x58]
mov ecx, dword [eax]
push ebx
push esi
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x40e2b8
cmp word [ebp - 0x80], 8
jne 0x40e2b8
cmp dword [ebp + 0x17c0], ebx
mov byte [ebp - 0x51], 1
je 0x40e2b8
push dword [ebp + 0x17c0]
push dword [ebp - 0x78]
call fcn.0040dc61
pop ecx
pop ecx
cmp esi, ebx
je 0x40e2c3
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x58]
cmp eax, ebx
je 0x40e2d0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x6c]
cmp eax, ebx
je 0x40e2e0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x6c], ebx
cmp dword [ebp - 0x70], ebx
je 0x40e2ee
push dword [ebp - 0x70]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x60]
cmp eax, ebx
je 0x40e2fe
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x60], ebx
mov eax, dword [ebp - 0x68]
cmp eax, ebx
je 0x40e30e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 0x68], ebx
cmp byte [ebp - 0x59], bl
je 0x40e319
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp byte [ebp - 0x51], bl
jne 0x40e3b3
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x58]
push eax
push ebx
push 0x20019
push ebx
push ebx
push ebx
push str.SoftwareClassesSoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push SysReAllocString
call edi
test eax, eax
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x40e373
push dword [ebp + 0x17c0]
push dword [ebp + 0x17bc]
push dword [ebp - 0x58]
call fcn.0040dd02
add esp, 0xc
push dword [ebp - 0x58]
mov byte [ebp - 0x51], al
call esi
cmp byte [ebp - 0x51], bl
jne 0x40e3b3
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x58]
push eax
push ebx
push 0x20019
push ebx
push ebx
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionGameUXGamesToFindOnWindowsUpgrade
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x40e3b3
push dword [ebp + 0x17c0]
push dword [ebp + 0x17bc]
push dword [ebp - 0x58]
call fcn.0040dd02
add esp, 0xc
push dword [ebp - 0x58]
mov byte [ebp - 0x51], al
call esi
mov al, byte [ebp - 0x51]
mov ecx, dword [ebp + 0x17b0]
neg al
pop edi
pop esi
pop ebx
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
call fcn.0042a57e
add ebp, 0x17b4
leave
ret 8