Function at 0x4035e0
Capabilities:
Link many functions at runtime
Read .ini file
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x514230
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x56a698]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4c], edi
xor esi, esi
mov dword [ebp - 0x18], esi
call fcn.0040a05e
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x40362c
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], esi
call fcn.0040a05e
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x403658
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x50], eax
push str.msi.dll
mov byte [ebp - 4], 1
mov dword [edi + 0xc4], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, esi
je 0x403d2b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MsiOpenDatabaseW
push edi
call esi
push str.MsiDatabaseOpenViewW
push edi
mov ebx, eax
call esi
push str.MsiViewFetch
push edi
mov dword [ebp - 0x58], eax
call esi
push str.MsiRecordGetStringW
push edi
mov dword [ebp - 0x60], eax
call esi
push str.MsiViewClose
push edi
mov dword [ebp - 0x64], eax
call esi
push str.MsiCloseHandle
push edi
mov dword [ebp - 0x6c], eax
call esi
push str.MsiQueryProductStateW
push edi
mov dword [ebp - 0x3c], eax
call esi
push str.MsiViewExecute
push edi
mov dword [ebp - 0x54], eax
call esi
push str.MsiGetProductInfoW
push edi
mov dword [ebp - 0x5c], eax
call esi
push str.MsiGetSummaryInformationW
push edi
mov dword [ebp - 0x48], eax
call esi
push str.MsiSummaryInfoGetPropertyW
push edi
mov dword [ebp - 0x40], eax
call esi
mov dword [ebp - 0x68], eax
call fcn.0040a05e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40371e
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx + 0xd8]
lea edx, [ebp - 0x34]
push edx
push 0
push eax
mov byte [ebp - 4], 2
call ebx
cmp dword [ebp - 0x34], 0
je 0x403cff
call fcn.0040a05e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x403767
push 0x80004005
call fcn.00401e50
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x28], eax
push 0x3b
push str.SELECT__Value__FROM__Property__WHERE_PropertyProductCode
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.00401ea0
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebx - 8]
push eax
push ebx
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [ebx - 8]
jg 0x403ca7
lea edx, [ebp - 0x10]
mov dword [ebx - 0xc], eax
xor ecx, ecx
push edx
mov word [ebx + eax*2], cx
mov eax, dword [ebp - 0x34]
push ebx
push eax
call dword [ebp - 0x58]
test eax, eax
jne 0x403cd8
mov ecx, dword [ebp - 0x10]
push eax
push ecx
call dword [ebp - 0x5c]
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x30]
push edx
push eax
call dword [ebp - 0x60]
test eax, eax
jne 0x403cbf
lea ecx, [ebp - 0x1c]
push ecx
push 0x400
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x1c], 0x400
call fcn.00402aa0
mov edx, dword [ebp - 0x30]
push eax
push 1
push edx
call dword [ebp - 0x64]
test eax, eax
jne 0x403cbf
mov esi, dword [ebp - 0x14]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [esi - 8]
jg 0x403ca7
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x403852
push 0
lea ecx, [ebp - 0x14]
call fcn.00401db0
mov esi, dword [ebp - 0x14]
push esi
call dword [ebp - 0x54]
cmp eax, 5
jne 0x403cb1
mov edx, dword [ebp - 0x4c]
mov eax, 1
mov dword [edx + 0xc4], eax
mov dword [ebp - 0x1c], 0
sub eax, dword [esi - 4]
mov ecx, dword [esi - 8]
or ecx, eax
jge 0x40388b
push 0
lea ecx, [ebp - 0x14]
call fcn.00401db0
mov esi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x48]
lea eax, [ebp - 0x1c]
push eax
push 0
push str.LocalPackage
push esi
call ebx
lea ecx, [ebp - 0x38]
call fcn.00402580
mov eax, 1
add dword [ebp - 0x1c], eax
sub eax, dword [esi - 4]
mov ecx, dword [esi - 8]
or ecx, eax
mov byte [ebp - 4], 4
jge 0x4038c7
push 0
lea ecx, [ebp - 0x14]
call fcn.00401db0
mov esi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x1c]
push ecx
push edx
lea ecx, [ebp - 0x38]
call fcn.00402aa0
push eax
push str.LocalPackage
push esi
call ebx
mov esi, dword [ebp - 0x38]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [esi - 8]
jg 0x403ca7
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea ecx, [ebp - 0x48]
call fcn.00402580
lea ecx, [ebp - 0x44]
call fcn.00402580
mov ecx, dword [esi - 8]
mov eax, 1
sub eax, dword [esi - 4]
mov byte [ebp - 4], 6
or ecx, eax
jge 0x40393a
push 0
lea ecx, [ebp - 0x38]
call fcn.00401db0
mov esi, dword [ebp - 0x38]
lea edx, [ebp - 0x20]
push edx
push 0
push esi
push 0
call dword [ebp - 0x40]
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x68]
push 0
push 0
lea eax, [ebp - 0x7c]
push eax
push 0
lea ecx, [ebp - 0x54]
push ecx
push 0xc
push edx
call ebx
lea eax, [ebp - 0x24]
push eax
push 0x100
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x24], 0x100
call fcn.00401e10
mov edx, dword [ebp - 0x20]
push eax
push 0
push 0
lea ecx, [ebp - 0x54]
push ecx
push 9
push edx
call ebx
mov esi, dword [ebp - 0x48]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [esi - 8]
jg 0x403ca7
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov edx, dword [ebp - 0x20]
push edx
call dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push ecx
call dword [ebp - 0x40]
mov ecx, dword [ebp - 0x20]
push 0
push 0
lea edx, [ebp - 0x74]
push edx
push 0
lea eax, [ebp - 0x54]
push eax
push 0xc
push ecx
call ebx
lea edx, [ebp - 0x24]
push edx
push 0x100
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x24], 0x100
call fcn.00401e10
mov ecx, dword [ebp - 0x20]
push eax
push 0
push 0
lea eax, [ebp - 0x54]
push eax
push 9
push ecx
call ebx
mov esi, dword [ebp - 0x44]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [esi - 8]
jg 0x403ca7
mov dword [esi - 0xc], eax
xor edx, edx
mov word [esi + eax*2], dx
mov eax, dword [ebp - 0x20]
push eax
call dword [ebp - 0x3c]
lea ecx, [ebp - 0x74]
push ecx
lea edx, [ebp - 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
je 0x403a73
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x48]
push ecx
call fcn.004024c0
add esp, 8
test al, al
jne 0x403a73
mov edx, dword [ebp + 8]
mov dword [ebp - 0x18], 1
mov dword [edx], 1
jmp 0x403c86
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x18], 0
call fcn.00402580
push str.SELECT__Value__FROM__Property__WHERE_PropertyPRODUCTVERSIONTYPE
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
call fcn.00401f90
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x10]
push eax
push ecx
push edx
call dword [ebp - 0x58]
test eax, eax
jne 0x403b30
push eax
mov eax, dword [ebp - 0x10]
push eax
call dword [ebp - 0x5c]
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0x30]
push ecx
push edx
call dword [ebp - 0x60]
test eax, eax
jne 0x403b30
lea eax, [ebp - 0x24]
push eax
push 0x400
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x24], 0x400
call fcn.00401e10
mov ecx, dword [ebp - 0x30]
push eax
push 1
push ecx
call dword [ebp - 0x64]
mov esi, dword [ebp - 0x40]
mov ebx, eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [esi - 8]
jg 0x403ca7
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
test ebx, ebx
jne 0x403b30
push str.SERVICEPACK
lea ecx, [ebp - 0x40]
call fcn.00402210
test eax, eax
jne 0x403b30
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 0x4c]
mov ebx, dword [ecx + 0xcc]
cmp dword [ebx - 0xc], 0
je 0x403bde
mov esi, dword [ebp - 0x2c]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x403b6a
push 0x400
lea ecx, [ebp - 0x2c]
call fcn.00401db0
mov esi, dword [ebp - 0x2c]
push ebx
push 0x400
push esi
push 0x522f50
push str.SetupMode
push str.SETUPREQUESTS
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [esi - 8]
jg 0x403ca7
xor edx, edx
mov dword [esi - 0xc], eax
lea ecx, [ebp - 0x2c]
mov word [esi + eax*2], dx
call fcn.00403030
lea ecx, [ebp - 0x2c]
call fcn.004032e0
push str.BATCH
lea ecx, [ebp - 0x2c]
call fcn.00402210
test eax, eax
jne 0x403bde
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov dword [ebp - 0x18], 1
push str.SELECT__Value__FROM__Property__WHERE_PropertyDLG_MAINTENANCE_TYPE
lea ecx, [ebp - 0x28]
call fcn.00401f90
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x10]
push ecx
push edx
push eax
call dword [ebp - 0x58]
test eax, eax
jne 0x403c59
mov ecx, dword [ebp - 0x10]
push eax
push ecx
call dword [ebp - 0x5c]
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x30]
push edx
push eax
call dword [ebp - 0x60]
test eax, eax
jne 0x403c59
lea ecx, [ebp - 0x24]
push ecx
push 0x400
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x24], 0x400
call fcn.00401e10
mov edx, dword [ebp - 0x30]
push eax
push 1
push edx
call dword [ebp - 0x64]
mov esi, dword [ebp - 0x50]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004fc64b
add esp, 8
test eax, eax
js 0x403ca7
cmp eax, dword [esi - 8]
jg 0x403ca7
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea edx, [ebp - 0x50]
push 0x522e80
push edx
call fcn.00402520
add esp, 8
test al, al
je 0x403c7e
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov dword [ebp - 0x18], 1
lea ecx, [ebp - 0x40]
call fcn.00401940
lea ecx, [ebp - 0x44]
call fcn.00401940
lea ecx, [ebp - 0x48]
call fcn.00401940
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.00401940
mov ebx, dword [ebp - 0x28]
jmp 0x403cbf
push 0x80070057
call fcn.00401e50
mov ecx, dword [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ecx + 0xc4], eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x403cca
push eax
call dword [ebp - 0x3c]
mov edx, dword [ebp - 0x10]
push edx
call dword [ebp - 0x6c]
mov eax, dword [ebp - 0x10]
push eax
call dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [ebp - 0x3c]
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403cff
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 [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d2e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x403d2e
mov dword [ebp - 0x18], esi
mov eax, dword [ebp - 0x50]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d77
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4