Function at 0x410af0
Capabilities:
Link many functions at runtime
Query or enumerate registry value
Reference sql statements

Disassembly:
push 0xffffffffffffffff
push 0x43fb50
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov eax, dword [0x456ea4]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], ebx
call fcn.0041890e
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x410b39
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edi
call fcn.0041890e
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x410b6f
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x1d
push str.SoftwareSiemensShared_Tools
lea ecx, [esp + 0x1c]
mov byte [esp + 0x68], 1
call fcn.004073e0
mov ecx, dword [esp + 0x14]
cmp ecx, edi
jne 0x410ba0
xor eax, eax
jmp 0x410bba
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, di
jne 0x410ba5
sub eax, esi
sar eax, 1
js 0x410cdc
cmp eax, dword [ecx - 8]
jg 0x410cdc
mov dword [ecx - 0xc], eax
mov word [ecx + eax*2], di
lea ecx, [ebx + 0x10c]
push ecx
lea edx, [esp + 0x44]
push 0x442694
push edx
call fcn.00406010
add esp, 0xc
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x68], 2
call fcn.00406540
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x60], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410c1d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebp, dword [esp + 0x14]
mov ecx, dword [ebp - 8]
mov eax, 1
sub eax, dword [ebp - 4]
or ecx, eax
jge 0x410c3e
push edi
lea ecx, [esp + 0x18]
call fcn.00407500
mov ebp, dword [esp + 0x14]
lea ecx, [esp + 0x30]
push ecx
push 0x2001f
push edi
push ebp
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x410d18
lea edx, [esp + 0x24]
push edx
push 0x800
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], 0x800
call fcn.00406ae0
mov ecx, dword [esp + 0x34]
push eax
lea eax, [esp + 0x5c]
push eax
push edi
push str.Release
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410ce6
mov esi, dword [esp + 0x2c]
cmp esi, edi
je 0x410cb1
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x410ca0
sub eax, edx
sar eax, 1
js 0x410cdc
cmp eax, dword [esi - 8]
jg 0x410cdc
mov ecx, dword [esp + 0x6c]
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], di
call fcn.004152b0
mov ecx, dword [esp + 0x30]
push ecx
mov dword [esp + 0x24], 1
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x410d26
push 0x80070057
call fcn.00406210
mov ecx, dword [esp + 0x6c]
push 0x442630
call fcn.004152b0
mov edx, dword [ebx + 0x1c]
push ebp
lea eax, [ebx + 0x1c]
push str.RegValue_not_found:__s
push 0xa
push eax
mov eax, dword [edx + 0x68]
call eax
mov ecx, dword [esp + 0x40]
add esp, 0x10
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x410d26
mov ecx, dword [esp + 0x6c]
push 0x442630
call fcn.004152b0
push str.msi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x411052
cmp dword [esp + 0x68], 0
je 0x410d8c
push str.MsiQueryProductStateW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
mov eax, dword [ebx + 0x68]
lea esi, [ebx + 0x68]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
or eax, ecx
jge 0x410d71
push 0
mov ecx, esi
call fcn.00407500
mov esi, dword [esi]
push esi
call edi
cmp eax, 5
jne 0x411052
mov dword [esp + 0x1c], 1
jmp 0x411052
lea edx, [ebx + 0x54]
push edx
add ebx, 0x110
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.00405eb0
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MsiOpenDatabaseW
push edi
mov byte [esp + 0x68], 3
call esi
push str.MsiDatabaseOpenViewW
push edi
mov ebp, eax
call esi
push str.MsiViewExecute
push edi
mov ebx, eax
call esi
push str.MsiViewFetch
push edi
mov dword [esp + 0x4c], eax
call esi
push str.MsiRecordGetStringW
push edi
mov dword [esp + 0x50], eax
call esi
push str.MsiViewClose
push edi
mov dword [esp + 0x54], eax
call esi
push str.MsiCloseHandle
push edi
mov dword [esp + 0x5c], eax
call esi
push str.MsiQueryProductStateW
push edi
mov dword [esp + 0x44], eax
call esi
mov edx, dword [esp + 0x40]
lea ecx, [esp + 0x28]
push ecx
push 0
push edx
mov dword [esp + 0x5c], eax
call ebp
cmp dword [esp + 0x28], 0
je 0x41101e
call fcn.0041890e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x410e3e
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x6c], eax
mov byte [esp + 0x60], 4
call fcn.0041890e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x410e6d
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x34], eax
push str.SELECT__Value__FROM__Property__WHERE_PropertyProductCode
lea ecx, [esp + 0x38]
mov byte [esp + 0x64], 5
call fcn.00406a30
mov esi, dword [esp + 0x34]
test esi, esi
jne 0x410e9c
xor eax, eax
jmp 0x410eb6
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x410ea1
sub eax, edx
sar eax, 1
js 0x410cdc
cmp eax, dword [esi - 8]
jg 0x410cdc
lea ecx, [esp + 0x68]
mov dword [esi - 0xc], eax
push ecx
mov word [esi + eax*2], 0
mov edx, dword [esp + 0x2c]
push esi
push edx
call ebx
test eax, eax
jne 0x410fcf
push eax
mov eax, dword [esp + 0x6c]
push eax
call dword [esp + 0x4c]
mov edx, dword [esp + 0x68]
lea ecx, [esp + 0x38]
push ecx
push edx
call dword [esp + 0x50]
test eax, eax
jne 0x410fb9
lea eax, [esp + 0x24]
push eax
push 0x400
lea ecx, [esp + 0x74]
mov dword [esp + 0x2c], 0x400
call fcn.00406ae0
mov ecx, dword [esp + 0x3c]
push eax
push 1
push ecx
call dword [esp + 0x5c]
test eax, eax
jne 0x410fb9
push 0xffffffffffffffff
lea ecx, [esp + 0x70]
call fcn.00406b40
push 0
lea ecx, [esp + 0x70]
call fcn.00406ab0
push eax
call dword [esp + 0x54]
cmp eax, 5
jne 0x410f72
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0x1c]
mov edx, dword [edx + 0x68]
push ecx
add eax, 0x1c
push str.MsiQueryProductStateFct:_Componentsetup_is_installed_for_GUID:__s
push 0xa
push eax
mov dword [esp + 0x2c], 1
call edx
jmp 0x410fb6
cmp eax, 0xffffffff
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x1c], 0
push edx
je 0x410f9f
cmp eax, 2
mov eax, dword [esp + 0x1c]
je 0x410f96
push str.MsiQueryProductStateFct:_unexpected_values_returned._But_Componentsetup_is_not_installed_for_GUID:__s
push 2
jmp 0x410faa
push str.MsiQueryProductStateFct:_Componentsetup_is_ONLY_installed_for_another_user_for_GUID:__s
push 2
jmp 0x410faa
mov eax, dword [esp + 0x1c]
push str.MsiQueryProductStateFct:_Componentsetup_is_NOT_installed_for_GUID:__s
push 0xa
mov ecx, dword [eax + 0x1c]
add eax, 0x1c
push eax
mov eax, dword [ecx + 0x68]
call eax
add esp, 0x10
mov eax, dword [esp + 0x38]
test eax, eax
je 0x410fc6
push eax
call dword [esp + 0x40]
mov ecx, dword [esp + 0x68]
push ecx
call dword [esp + 0x58]
mov edx, dword [esp + 0x28]
push edx
call dword [esp + 0x40]
lea eax, [esi - 0x10]
mov byte [esp + 0x60], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410ff9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x6c]
add eax, 0xfffffff0
mov byte [esp + 0x60], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41101e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x60], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41104a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
mov ecx, ebx
call fcn.0040f4a0
cmp dword [esp + 0x1c], 0
je 0x411079
test eax, eax
jge 0x411079
mov ecx, dword [esp + 0x20]
sub ecx, 1
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffd
add ecx, 2
mov dword [esp + 0x20], ecx
mov esi, dword [esp + 0x20]
mov edx, dword [ebx + 0x1c]
push eax
mov eax, dword [edx + 0x68]
push esi
lea ecx, [ebx + 0x1c]
push str.IsInstalled:__d__MsiCompInstalled:__d
push 0xa
push ecx
call eax
lea eax, [ebp - 0x10]
add esp, 0x14
mov byte [esp + 0x60], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4110b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov dword [esp + 0x60], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4110de
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 8