Function at 0x401656
Capabilities:
Check if file exists
Delete file
Get file attributes
Reference sql statements

Disassembly:
push 0x44
mov eax, 0x4769d4
call fcn.0045be74
mov ebx, ecx
push str.Extract7zArchiveFromMsiContainer...
lea ecx, [ebp - 0x20]
call fcn.004020a6
xor esi, esi
push esi
lea eax, [ebp - 0x20]
push eax
push 2
mov dword [ebp - 4], esi
call fcn.004152d1
mov ecx, dword [ebp - 0x20]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov dword [ebp - 4], 1
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
push esi
push eax
mov dword [ebp - 0x18], esi
call sub.msi.dll_MsiOpenProductW
mov edi, eax
cmp edi, esi
je 0x401715
push str.MsiOpenDatabase__
lea ecx, [ebp + 8]
call fcn.004020a6
push edi
lea eax, [ebp + 8]
push eax
push 1
mov byte [ebp - 4], 4
call fcn.004152d1
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov edi, eax
call fcn.004025d2
cmp dword [ebp - 0x14], esi
je 0x4016f4
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], esi
je 0x401701
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], esi
je 0x40170e
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, edi
jmp 0x401a7b
call fcn.0044825c
push eax
lea ecx, [ebp - 0x24]
call fcn.0041872d
mov byte [ebp - 4], 5
push dword [ebx]
lea eax, [ebp - 0x24]
push str.SELECT__FROM__Binary__WHERE__Name__s
push eax
call fcn.00402086
add esp, 0xc
cmp dword [ebp - 0x10], esi
je 0x401747
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov edi, dword [ebp - 0x24]
lea eax, [ebp - 0x10]
push eax
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x10], esi
call sub.msi.dll_MsiEnumClientsA
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x4017c6
push str.MsiDatabaseOpenView__
lea ecx, [ebp + 8]
call fcn.004020a6
mov byte [ebp - 4], 6
push dword [ebp - 0x20]
lea eax, [ebp + 8]
push eax
push 1
call fcn.004152d1
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov ebx, eax
call fcn.004025d2
lea ecx, [edi - 0x10]
call fcn.004025d2
cmp dword [ebp - 0x14], esi
je 0x4017a5
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], esi
je 0x4017b2
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], esi
je 0x4017bf
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, ebx
jmp 0x401a7b
push esi
push dword [ebp - 0x10]
call sub.msi.dll_MsiViewModify
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x4017e9
push str.MsiViewExecut__
lea ecx, [ebp + 8]
call fcn.004020a6
mov byte [ebp - 4], 7
jmp 0x401772
cmp dword [ebp - 0x14], esi
je 0x4017f6
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x14], esi
call sub.msi.dll_MsiDatabaseIsTablePersistentA
mov dword [ebp - 0x20], eax
cmp eax, esi
je 0x401822
push str.MsiViewFetch__
lea ecx, [ebp + 8]
call fcn.004020a6
mov byte [ebp - 4], 8
jmp 0x401772
push 2
push dword [ebp - 0x14]
call sub.msi.dll_MsiRecordGetStringW
push eax
mov dword [ebp - 0x2c], eax
call fcn.00447e91
pop ecx
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00401de9
add esp, 0xc
push str.___File:
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xa
call fcn.004020a6
push esi
mov byte [ebp - 4], 0xb
push dword [ebp + 8]
lea eax, [ebp - 0x28]
push eax
push 2
call fcn.00414e01
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
push str.___archive_file:
lea ecx, [ebp + 8]
call fcn.004020a6
push esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
push 2
mov byte [ebp - 4], 0xc
call fcn.00414e01
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401988
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401988
push str.Failed_to_delete_existing_archive:
lea ecx, [ebp + 8]
call fcn.004020a6
push 0x186a0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
push 1
mov byte [ebp - 4], 0xd
call fcn.00414e01
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
call fcn.0044825c
push eax
lea ecx, [ebp + 8]
call fcn.0041872d
push esi
mov byte [ebp - 4], 0xe
call fcn.00459264
pop ecx
push eax
call fcn.00459230
pop ecx
call fcn.00459242
mov ecx, dword [ebx]
push eax
push ecx
lea eax, [ebp + 8]
push str._s_d
push eax
call fcn.00402086
add esp, 0x10
lea eax, [ebp + 8]
push eax
mov ecx, ebx
call fcn.00402573
push ebx
push dword [ebp + 0xc]
lea eax, [ebp - 0x28]
push eax
call fcn.00401de9
add esp, 0xc
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xf
call fcn.00402573
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025d2
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004025d2
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x20]
push 2
push dword [ebp - 0x14]
call sub.msi.dll_MsiRecordSetStringA
test eax, eax
jne 0x401a1a
lea ecx, [ebp - 0x3c]
call fcn.00448969
push esi
push 0xffffffffffffffff
push esi
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0x10
call fcn.00401fed
lea eax, [ebp - 0x50]
push eax
push 0x1001
mov byte [ebp - 4], 0x11
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x3c]
call fcn.00448d80
mov ebx, 0x1fbd0
cmp dword [0x4c4bf8], ebx
je 0x401a81
cmp eax, esi
je 0x401a81
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x3c]
push dword [ebp - 0x20]
call fcn.0044869f
lea ecx, [ebp - 0x3c]
call fcn.00448903
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
mov dword [ebp - 0x50], vtable.CFileException.0
call fcn.004025d2
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
call fcn.00448a44
push esi
push 1
push dword [ebp - 0x14]
call sub.msi.dll_MsiReinstallFeatureFromDescriptorA
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
push dword [ebp - 0x20]
call fcn.00447e9c
pop ecx
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025d2
lea ecx, [edi - 0x10]
call fcn.004025d2
cmp dword [ebp - 0x14], esi
je 0x401a5e
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], esi
je 0x401a6b
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], esi
je 0x401a78
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
inc eax
call fcn.0045bf4c
ret
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push str.Create_file_failed:
push eax
call fcn.00401e40
add esp, 0xc
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x12
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
push ebx
mov ecx, eax
mov ebx, 0x4c4bf0
call fcn.0041384f
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
mov dword [ebp - 0x50], vtable.CFileException.0
call fcn.004025d2
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
call fcn.00448a44
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025d2
lea ecx, [edi - 0x10]
call fcn.004025d2
cmp dword [ebp - 0x14], esi
je 0x401b0c
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], esi
je 0x401b19
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], esi
je 0x401b26
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
jmp 0x401a7b