Function at 0x40e2d0
Capabilities:
Link many functions at runtime
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x527120
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x587730]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
push str.Compsetupstarter
lea ecx, [ebp - 0x14]
call fcn.00406480
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x24], edi
call fcn.0041a2c9
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40e32c
push 0x80004005
call fcn.00405680
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 1
call fcn.0041a2c9
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40e359
push 0x80004005
call fcn.00405680
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
lea ecx, [esi + 0x16c]
mov byte [ebp - 4], 2
call fcn.004272f0
push str.msi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
cmp ebx, edi
je 0x40e665
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MsiGetActiveDatabase
push ebx
call edi
push str.MsiCloseHandle
push ebx
mov dword [ebp - 0x20], eax
call edi
mov ecx, dword [ebp + 8]
push ecx
mov dword [ebp - 0x2c], eax
call dword [ebp - 0x20]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40e63b
call fcn.0041a2c9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e3d4
push 0x80004005
call fcn.00405680
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
push str.MsiDatabaseOpenViewW
push ebx
mov byte [ebp - 4], 3
call edi
push str.MsiViewExecute
push ebx
mov esi, eax
call edi
mov ecx, dword [ebp - 0x18]
add ecx, 0x6c
push ecx
lea edx, [ebp - 0x30]
push str.SELECT_Client_FROM_ADSCompClients_WHERE_Component
push edx
mov dword [ebp - 0x34], eax
call fcn.00405d20
push 0x53b77c
push eax
lea eax, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 4
call fcn.00405c70
add esp, 0x18
mov eax, dword [eax]
mov edx, dword [ebp - 0x20]
lea ecx, [ebp + 8]
push ecx
push eax
push edx
mov byte [ebp - 4], 5
call esi
neg eax
sbb esi, esi
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
inc esi
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e460
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e483
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
je 0x40e5fe
mov ecx, dword [ebp + 8]
push 0
push ecx
call dword [ebp - 0x34]
test eax, eax
je 0x40e4ba
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov edx, dword [eax + 0x24]
mov edx, dword [edx + 0x6c]
push str._Couldnt_Open_View
add eax, 0x24
push ecx
push 1
push eax
call edx
add esp, 0x10
jmp 0x40e5f0
push str.MsiViewFetch
push ebx
call edi
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x1c]
push ecx
push edx
mov dword [ebp - 0x30], eax
call eax
test eax, eax
jne 0x40e5e3
jmp 0x40e4e0
push str.MsiRecordGetStringW
push ebx
mov dword [ebp - 0x28], 0x800
call edi
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
mov edi, ecx
test ecx, ecx
js 0x40e631
mov edx, dword [ebp - 0x10]
mov eax, dword [edx - 8]
mov esi, 1
sub esi, dword [edx - 4]
sub eax, ecx
or eax, esi
jge 0x40e51f
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406f10
mov edx, dword [ebp - 0x10]
mov eax, edx
cmp edi, dword [edx - 8]
jg 0x40e631
mov dword [edx - 0xc], edi
mov edx, dword [ebp - 0x10]
xor ecx, ecx
mov word [edx + edi*2], cx
mov edx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x28]
push ecx
push eax
push 1
push edx
call dword [ebp - 0x34]
test eax, eax
jne 0x40e5ad
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0050cf35
add esp, 8
test eax, eax
js 0x40e631
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx - 8]
jg 0x40e631
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x10]
xor ecx, ecx
mov word [edx + eax*2], cx
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x10]
push eax
add ecx, 0x16c
call fcn.00427419
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x24]
push edx
mov edx, dword [ebp - 0x14]
push str.__Read_Client_from_Table:__s
add eax, 0x24
push edx
push 0xa
push eax
mov eax, dword [ecx + 0x6c]
call eax
add esp, 0x14
jmp 0x40e5ca
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0x24]
push str._ReadClientsFromTable:_MsiRecordgetString_failed
add eax, 0x24
push edx
push 0
push eax
mov eax, dword [ecx + 0x6c]
call eax
add esp, 0x10
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x1c]
push ecx
push edx
call dword [ebp - 0x30]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40e4e0
cmp dword [ebp - 0x1c], 0
je 0x40e5f0
mov eax, dword [ebp - 0x20]
push eax
call dword [ebp - 0x2c]
push str.MsiViewClose
push ebx
call edi
mov ecx, dword [ebp + 8]
push ecx
call eax
mov edx, dword [ebp - 0x20]
push edx
call dword [ebp - 0x2c]
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e65c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40e688
push 0x80070057
call fcn.00405680
mov edx, dword [ebp - 0x14]
mov ecx, dword [esi + 0x24]
push str._ReadClientsFromTable:_MsiGetActiveDatabase_Failed
push edx
lea eax, [esi + 0x24]
push 0
push eax
mov eax, dword [ecx + 0x6c]
call eax
add esp, 0x10
mov dword [ebp - 0x24], 0xffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40e688
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x14]
mov ecx, dword [esi + 0x24]
push eax
push str._LoadLibrary_msi.dll_Failed__error:_d
push edx
add esi, 0x24
mov dword [ebp - 0x24], eax
mov eax, dword [ecx + 0x6c]
push edi
push esi
call eax
add esp, 0x14
mov eax, dword [ebp - 0x10]
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 0x40e6ab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x3c]
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 0x40e6ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
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 0x40e6f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x24]
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