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

Disassembly:
push 0x44
mov eax, 0x44e959
call fcn.00436706
push str.Extract7zArchive...
lea ecx, [ebp - 0x20]
call fcn.00402148
xor edi, edi
push edi
lea eax, [ebp - 0x20]
push eax
push 2
mov dword [ebp - 4], edi
call fcn.0040e1e3
mov ecx, dword [ebp - 0x20]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025ca
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push ecx
push edi
push eax
mov dword [ebp - 0x18], edi
call sub.msi.dll_MsiOpenProductW
mov esi, eax
cmp esi, edi
je 0x40171b
push str.MsiOpenDatabase__
lea ecx, [ebp + 8]
call fcn.00402148
push esi
lea eax, [ebp + 8]
push eax
push ebx
mov byte [ebp - 4], 4
call fcn.0040e1e3
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov esi, eax
call fcn.004025ca
cmp dword [ebp - 0x14], edi
je 0x4016fa
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x401707
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x401714
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, esi
jmp 0x401a11
call fcn.004234c0
push eax
lea ecx, [ebp - 0x24]
call fcn.0040f910
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 5
push dword [eax]
lea eax, [ebp - 0x24]
push str.SELECT__FROM__Binary__WHERE__Name__s
push eax
call fcn.004020dd
add esp, 0xc
cmp dword [ebp - 0x10], edi
je 0x401750
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov esi, dword [ebp - 0x24]
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp - 0x18]
mov dword [ebp - 0x10], edi
call sub.msi.dll_MsiEnumClientsA
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x4017ce
push str.Extract7zArchive:MsiDatabaseOpenView__
lea ecx, [ebp + 8]
call fcn.00402148
mov byte [ebp - 4], 6
push dword [ebp - 0x1c]
lea eax, [ebp + 8]
push eax
push ebx
call fcn.0040e1e3
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov ebx, eax
call fcn.004025ca
lea ecx, [esi - 0x10]
call fcn.004025ca
cmp dword [ebp - 0x14], edi
je 0x4017ad
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x4017ba
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x4017c7
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, ebx
jmp 0x401a11
push edi
push dword [ebp - 0x10]
call sub.msi.dll_MsiViewModify
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x4017f1
push str.Extract7zArchive:MsiViewExecut__
lea ecx, [ebp + 8]
call fcn.00402148
mov byte [ebp - 4], 7
jmp 0x40177b
cmp dword [ebp - 0x14], edi
je 0x4017fe
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
call sub.msi.dll_MsiDatabaseIsTablePersistentA
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x40182a
push str.Extract7zArchive:MsiViewFetch__
lea ecx, [ebp + 8]
call fcn.00402148
mov byte [ebp - 4], 8
jmp 0x40177b
push 2
push dword [ebp - 0x14]
call sub.msi.dll_MsiRecordGetStringW
push eax
mov dword [ebp - 0x2c], eax
call fcn.00423146
mov dword [ebp - 0x20], eax
pop ecx
lea eax, [ebp - 0x1c]
push eax
mov eax, 0x48099c
call fcn.00401000
push dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xa
call fcn.00401f1d
push str.___File:
lea ecx, [ebp - 0x28]
call fcn.00402148
push edi
mov byte [ebp - 4], 0xb
push dword [ebp + 8]
lea eax, [ebp - 0x28]
push eax
push 2
call fcn.0040dd5d
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025ca
push str.___archive_file:
lea ecx, [ebp + 8]
call fcn.00402148
push edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
push 2
mov byte [ebp - 4], 0xc
call fcn.0040dd5d
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025ca
mov ebx, dword [ebp - 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401920
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401920
push str.Failed_to_delete_previous_ARM_update_archive:
lea ecx, [ebp + 8]
call fcn.00402148
push 0x186a0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
push 1
mov byte [ebp - 4], 0xd
call fcn.0040dd5d
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025ca
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 0x4019b3
lea ecx, [ebp - 0x3c]
call fcn.00423bef
push edi
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0xe
call fcn.00402044
lea eax, [ebp - 0x50]
push eax
push 0x1001
push ebx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xf
call fcn.00423ff0
mov ebx, 0x1fbd0
cmp dword [0x480a5c], ebx
je 0x401a17
cmp eax, edi
je 0x401a17
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x3c]
push dword [ebp - 0x20]
call fcn.00423925
lea ecx, [ebp - 0x3c]
call fcn.00423b89
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
mov dword [ebp - 0x50], vtable.CFileException.0
call fcn.004025ca
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
call fcn.00423cca
mov ebx, dword [ebp - 0x1c]
push edi
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.0042313b
pop ecx
lea ecx, [ebx - 0x10]
call fcn.004025ca
lea ecx, [esi - 0x10]
call fcn.004025ca
cmp dword [ebp - 0x14], edi
je 0x4019f4
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x401a01
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x401a0e
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
inc eax
call fcn.004367de
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.00401e84
add esp, 0xc
mov dword [ebp + 8], eax
mov byte [ebp - 4], 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp + 8]
mov ecx, eax
push ebx
mov edx, 0x480a54
call fcn.0040c5be
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025ca
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
mov dword [ebp - 0x50], vtable.CFileException.0
call fcn.004025ca
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
call fcn.00423cca
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025ca
lea ecx, [esi - 0x10]
call fcn.004025ca
cmp dword [ebp - 0x14], edi
je 0x401aa2
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x401aaf
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x401abc
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
jmp 0x401a11