Function at 0x40eb50
Capabilities:
Reference sql statements
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1134
call fcn.0043c8d0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x1114], edx
mov ecx, 0x1b
mov dword [ebp - 0x1124], ebx
mov esi, str.SELECT__Name____Data__FROM___Streams__WHERE__Name___
lea edi, [ebp - 0x104]
rep movsd dword es:[edi], dword [esi]
push 0x92
lea eax, [ebp - 0x96]
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.0042a4e0
add esp, 0xc
mov dword [ebp - 0x110c], 0
lea eax, [ebp - 0x110c]
mov dword [ebp - 0x1110], 0
xorps xmm0, xmm0
mov dword [ebp - 0x1118], 0
movq qword [ebx], xmm0
push eax
push str.SELECT__DiskPrompt____Cabinet____VolumeLabel____Source____DiskId____LastSequence__FROM__Media__ORDER_BY__DiskId_
push dword [ebp + 8]
mov dword [ebp - 0x1128], 0
mov dword [ebp - 0x111c], 0
mov dword [ebp - 0x1108], 0
mov dword [ebp - 0x1120], 0x1000
mov dword [ebp - 0x1130], 0
mov dword [ebx + 8], 0
call dword [sym.imp.msi.dll_MsiEnumClientsA]
mov dword [0x45771c], eax
test eax, eax
jne 0x40f189
push 0x318
push eax
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebx], eax
test eax, eax
je 0x40f0d7
push 0
push dword [ebp - 0x110c]
call dword [sym.imp.msi.dll_MsiViewModify]
mov edi, dword [ebx]
lea eax, [ebp - 0x1108]
mov esi, dword [sym.imp.msi.dll_MsiGetSummaryInformationW]
push eax
lea eax, [ebp - 0x112c]
mov dword [ebx + 4], 0xb
push eax
push str.SourceDir
push dword [ebp - 0x1114]
mov dword [ebp - 0x111c], 0
mov dword [ebp - 0x1108], 0
mov dword [ebp - 0x112c], 0
call esi
mov dword [0x45771c], eax
cmp eax, 0xea
jne 0x40ece7
mov eax, dword [ebp - 0x1108]
inc eax
mov dword [ebp - 0x1108], eax
lea eax, [eax*2 + 0x10]
push eax
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x111c], eax
test eax, eax
je 0x40ece7
lea ecx, [ebp - 0x1108]
push ecx
push eax
push str.SourceDir
push dword [ebp - 0x1114]
call esi
mov dword [0x45771c], eax
lea eax, [ebp - 0x1110]
push eax
push dword [ebp - 0x110c]
call dword [sym.imp.msi.dll_MsiDatabaseIsTablePersistentA]
test eax, eax
jne 0x40f02e
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
cmp eax, ecx
jne 0x40ed45
add ecx, ecx
mov eax, ecx
mov dword [ebx + 4], ecx
shl eax, 4
add eax, ecx
shl eax, 2
push eax
push dword [ebx]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
test edx, edx
je 0x40f0d7
mov eax, dword [ebx + 8]
mov ecx, eax
shl ecx, 4
add ecx, eax
mov dword [ebx], edx
lea edi, [edx + ecx*4]
push 0x44
inc eax
push 0
push edi
mov dword [ebx + 8], eax
call fcn.0042a4e0
add esp, 0xc
mov esi, 1
nop dword [eax + eax]
lea ebx, [esi + 5]
lea ebx, [edi + ebx*4]
cmp esi, 1
jne 0x40ef20
push dword [ebp + 0xc]
mov edx, dword [ebp - 0x1110]
lea eax, [edi + 4]
mov ecx, dword [ebp - 0x1114]
push ebx
push eax
push esi
call fcn.0040c990
add esp, 0x10
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
inc esi
cmp esi, 5
jb 0x40ed60
mov ecx, dword [edi + 0x1c]
test ecx, ecx
je 0x40efe6
mov eax, dword [ebp - 0x1108]
add eax, 4
add eax, ecx
mov dword [edi + 0x14], eax
lea eax, [eax*2 + 0xa]
push eax
push 0
push dword [0x45764c]
call ebx
mov dword [edi], eax
test eax, eax
je 0x40f0d1
mov ecx, dword [ebp - 0x1108]
add ecx, ecx
push ecx
push dword [ebp - 0x111c]
push eax
call fcn.0043c9e0
mov ecx, dword [edi + 8]
add esp, 0xc
mov eax, dword [edi + 0x1c]
add eax, eax
cmp word [ecx], 0x23
jne 0x40efbd
push eax
lea eax, [ecx + 2]
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.0043c9e0
mov eax, dword [edi + 0x1c]
add esp, 0xc
mov dword [ebp + eax*2 - 0x9a], 0x27
lea eax, [ebp - 0x1118]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 8]
call dword [sym.imp.msi.dll_MsiEnumClientsA]
test eax, eax
jne 0x40ef9e
push eax
push dword [ebp - 0x1118]
call dword [sym.imp.msi.dll_MsiViewModify]
lea eax, [ebp - 0x1128]
push eax
push dword [ebp - 0x1118]
call dword [sym.imp.msi.dll_MsiDatabaseIsTablePersistentA]
test eax, eax
jne 0x40efd6
mov dword [ebp - 0x1120], 0x1000
mov eax, dword [edi + 0x1c]
dec dword [edi + 0x14]
add eax, eax
mov ecx, dword [edi]
push eax
mov eax, dword [edi + 8]
add eax, 2
push eax
mov eax, dword [ebp - 0x1108]
lea eax, [ecx + eax*2]
push eax
call fcn.0043c9e0
add esp, 0xc
push 0
push 0xa000080
push 2
push 0
push 1
push 0x40000000
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40ef03
nop
lea eax, [ebp - 0x1120]
push eax
lea eax, [ebp - 0x1104]
push eax
push 2
push dword [ebp - 0x1128]
call dword [sym.imp.msi.dll_MsiRecordSetStringA]
test eax, eax
jne 0x40eef8
push eax
lea eax, [ebp - 0x1130]
push eax
push dword [ebp - 0x1120]
lea eax, [ebp - 0x1104]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x1120], 0x1000
je 0x40eeb0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [edi + 0x40], 1
push dword [ebp - 0x1118]
call dword [sym.imp.msi.dll_MsiViewGetErrorW]
push dword [ebp - 0x1118]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
jmp 0x40efd6
push ebx
push 0x457498
push esi
push dword [ebp - 0x1110]
call dword [sym.imp.msi.dll_MsiRecordSetStreamA]
mov dword [0x45771c], eax
mov ecx, dword [ebx]
cmp eax, 0xea
jne 0x40ef7c
lea eax, [ecx + 1]
lea ebx, [esi + 5]
lea ebx, [edi + ebx*4]
mov dword [ebx], eax
add eax, eax
push eax
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + esi*4], eax
test eax, eax
je 0x40f0d1
push ebx
push eax
push esi
push dword [ebp - 0x1110]
call dword [sym.imp.msi.dll_MsiRecordSetStreamA]
jmp 0x40ed8c
test ecx, ecx
jne 0x40ed8c
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 2
push 8
push dword [0x45764c]
call ebx
mov dword [edi + esi*4], eax
jmp 0x40ed92
push dword [edi]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [edi], 0
mov dword [edi + 0x14], 0
jmp 0x40f00d
add eax, 2
push eax
mov eax, dword [ebp - 0x1108]
push ecx
mov ecx, dword [edi]
lea eax, [ecx + eax*2]
push eax
call fcn.0043c9e0
add esp, 0xc
mov ecx, dword [edi]
lea edx, [edi + 0x34]
sub esp, 8
call fcn.0040cb30
add esp, 8
mov esi, dword [sym.imp.msi.dll_MsiRecordReadStream]
push 5
push dword [ebp - 0x1110]
call esi
push 6
mov word [edi + 0x2a], ax
push dword [ebp - 0x1110]
call esi
movzx eax, ax
mov dword [edi + 0x2c], eax
add edi, 0x44
lea eax, [ebp - 0x1110]
push eax
push dword [ebp - 0x110c]
call dword [sym.imp.msi.dll_MsiDatabaseIsTablePersistentA]
mov ebx, dword [ebp - 0x1124]
test eax, eax
je 0x40ed02
push dword [ebp - 0x110c]
call dword [sym.imp.msi.dll_MsiViewGetErrorW]
push dword [ebp - 0x110c]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
push dword [ebp - 0x111c]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [0x45764c]
call esi
mov eax, dword [ebx + 8]
mov edx, dword [ebx]
test eax, eax
jne 0x40f09a
push edx
push eax
push dword [0x45764c]
call esi
pop edi
xorps xmm0, xmm0
xor al, al
movq qword [ebx], xmm0
mov dword [ebx + 8], 0
pop esi
mov dword [0x45771c], 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428cd6
mov esp, ebp
pop ebp
ret
inc eax
mov ecx, eax
mov dword [ebx + 4], eax
shl ecx, 4
add ecx, eax
shl ecx, 2
push ecx
push edx
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x40f0be
mov dword [ebx], eax
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00428cd6
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x1124]
mov eax, dword [ebx]
mov ecx, eax
mov ebx, dword [ebx + 8]
mov dword [ebp - 0x1114], eax
mov dword [ebp - 0x1134], ecx
test ebx, ebx
je 0x40f132
nop
mov esi, eax
mov edi, 5
nop word [eax + eax]
push dword [esi]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea esi, [esi + 4]
sub edi, 1
jne 0x40f100
mov eax, dword [ebp - 0x1114]
add eax, 0x44
mov dword [ebp - 0x1114], eax
sub ebx, 1
jne 0x40f0f0
mov ecx, dword [ebp - 0x1134]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push ecx
push 0
push dword [0x45764c]
call ebx
mov eax, dword [ebp - 0x1124]
xorps xmm0, xmm0
push dword [ebp - 0x110c]
movq qword [eax], xmm0
mov dword [eax + 8], 0
mov dword [0x45771c], 8
call dword [sym.imp.msi.dll_MsiViewGetErrorW]
push dword [ebp - 0x110c]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
push dword [ebp - 0x111c]
push 0
push dword [0x45764c]
call ebx
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00428cd6
mov esp, ebp
pop ebp
ret