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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f5c5
mov eax, dword fs:[0]
push eax
mov eax, 0x141c
call fcn.0040ea10
mov eax, dword [0x4105f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x3e
jg 0x4041f2
and dword [ebp - 0x1418], 0
and dword [ebp - 4], 0
push 1
call dword [sym.imp.msi.dll_MsiDatabaseExportA]
mov esi, eax
mov dword [ebp - 0x1428], esi
and dword [ebp - 0x1414], 0
push edi
push 1
push esi
mov byte [ebp - 4], 2
call dword [sym.imp.msi.dll_MsiReinstallFeatureFromDescriptorW]
test eax, eax
je 0x404009
mov dword [ebx + 0xc], 1
push 0x27
pop edx
mov ecx, edi
jmp 0x4041fc
cmp dword [ebp - 0x1418], 0
je 0x40401e
push dword [ebp - 0x1418]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
and dword [ebp - 0x1418], 0
lea eax, [ebp - 0x1418]
push eax
push 0x402948
push dword [ebx + 4]
call dword [sym.imp.msi.dll_MsiEnableUIPreview]
test eax, eax
je 0x40404b
push 0x1a
lea eax, [ebx + 0x28]
mov ecx, ebx
push eax
call fcn.00403360
push esi
push dword [ebp - 0x1418]
call dword [sym.imp.msi.dll_MsiViewModify]
test eax, eax
je 0x404069
push 0x1b
lea eax, [ebx + 0x28]
mov ecx, ebx
push eax
call fcn.00403360
cmp dword [ebp - 0x1414], 0
je 0x40407e
push dword [ebp - 0x1414]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
and dword [ebp - 0x1414], 0
lea eax, [ebp - 0x1414]
push eax
push dword [ebp - 0x1418]
call dword [sym.imp.msi.dll_MsiDatabaseIsTablePersistentA]
cmp eax, 0x103
jne 0x4040ae
mov edx, 0x402b1c
mov ecx, 0x402b3c
jmp 0x4041fc
xor eax, eax
push eax
push 0x80
push 1
push eax
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x1420], eax
cmp eax, 0xffffffff
jne 0x40410f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x402ab0
lea eax, [ebp - 0x410]
push 0x400
push eax
call fcn.004030ae
add esp, 0x14
lea edx, [ebp - 0x410]
test eax, eax
sets al
dec al
and byte [ebp - 0x410], al
mov ecx, 0x402a2c
jmp 0x4041fc
and dword [ebp - 0x1424], 0
jmp 0x40413d
push 0
lea ecx, [ebp - 0x1424]
push ecx
push eax
lea eax, [ebp - 0x1410]
push eax
push dword [ebp - 0x1420]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4041ce
lea eax, [ebp - 0x141c]
mov dword [ebp - 0x141c], 0x1000
push eax
lea eax, [ebp - 0x1410]
push eax
push 2
push dword [ebp - 0x1414]
call dword [sym.imp.msi.dll_MsiRecordSetStringA]
test eax, eax
jne 0x4041e4
mov eax, dword [ebp - 0x141c]
test eax, eax
jne 0x404118
push dword [ebp - 0x1420]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1414], 0
je 0x404192
push dword [ebp - 0x1414]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
test esi, esi
je 0x40419d
push esi
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
cmp dword [ebp - 0x1418], 0
je 0x4041b2
push dword [ebp - 0x1418]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00406053
leave
ret 4
push dword [ebp - 0x1420]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x402b54
jmp 0x404105
mov dword [ebx + 0xc], 1
push 0x2a
jmp 0x404001
mov edx, 0x402868
mov ecx, 0x402890
call fcn.00403242
int3