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

Disassembly:
push 0x44
mov eax, 0x455497
call fcn.0043cf0a
push str.Extract7zArchive...
lea ecx, [ebp - 0x20]
call fcn.0040215a
xor edi, edi
push edi
lea eax, [ebp - 0x20]
push eax
push 2
mov dword [ebp - 4], edi
call fcn.0040e50d
mov ecx, dword [ebp - 0x20]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025e7
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 0x40172e
push str.MsiOpenDatabase__
lea ecx, [ebp + 8]
call fcn.0040215a
push esi
lea eax, [ebp + 8]
push eax
push ebx
mov byte [ebp - 4], 4
call fcn.0040e50d
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov esi, eax
call fcn.004025e7
cmp dword [ebp - 0x14], edi
je 0x40170d
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x40171a
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x401727
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, esi
jmp 0x401a24
call fcn.00429b48
push eax
lea ecx, [ebp - 0x24]
call fcn.0040fc71
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.004020ef
add esp, 0xc
cmp dword [ebp - 0x10], edi
je 0x401763
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 0x4017e1
push str.Extract7zArchive:MsiDatabaseOpenView__
lea ecx, [ebp + 8]
call fcn.0040215a
mov byte [ebp - 4], 6
push dword [ebp - 0x1c]
lea eax, [ebp + 8]
push eax
push ebx
call fcn.0040e50d
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov ebx, eax
call fcn.004025e7
lea ecx, [esi - 0x10]
call fcn.004025e7
cmp dword [ebp - 0x14], edi
je 0x4017c0
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x4017cd
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x4017da
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, ebx
jmp 0x401a24
push edi
push dword [ebp - 0x10]
call sub.msi.dll_MsiViewModify
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x401804
push str.Extract7zArchive:MsiViewExecut__
lea ecx, [ebp + 8]
call fcn.0040215a
mov byte [ebp - 4], 7
jmp 0x40178e
cmp dword [ebp - 0x14], edi
je 0x401811
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 0x40183d
push str.Extract7zArchive:MsiViewFetch__
lea ecx, [ebp + 8]
call fcn.0040215a
mov byte [ebp - 4], 8
jmp 0x40178e
push 2
push dword [ebp - 0x14]
call sub.msi.dll_MsiRecordGetStringW
push eax
mov dword [ebp - 0x2c], eax
call fcn.004297ce
mov dword [ebp - 0x20], eax
pop ecx
lea eax, [ebp - 0x1c]
push eax
mov eax, 0x48b9dc
call fcn.00401013
push dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0xa
call fcn.00401f30
push str.___File:
lea ecx, [ebp - 0x28]
call fcn.0040215a
push edi
mov byte [ebp - 4], 0xb
push dword [ebp + 8]
lea eax, [ebp - 0x28]
push eax
push 2
call fcn.0040e087
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x28]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025e7
push str.___archive_file:
lea ecx, [ebp + 8]
call fcn.0040215a
push edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
push 2
mov byte [ebp - 4], 0xc
call fcn.0040e087
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025e7
mov ebx, dword [ebp - 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401933
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401933
push str.Failed_to_delete_previous_ARM_update_archive:
lea ecx, [ebp + 8]
call fcn.0040215a
push 0x186a0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
push 1
mov byte [ebp - 4], 0xd
call fcn.0040e087
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025e7
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 0x4019c6
lea ecx, [ebp - 0x3c]
call fcn.0042a277
push edi
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0xe
call fcn.00402056
lea eax, [ebp - 0x50]
push eax
push 0x1001
push ebx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xf
call fcn.0042a678
mov ebx, 0x1fbd0
cmp dword [0x48bab0], ebx
je 0x401a2a
cmp eax, edi
je 0x401a2a
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x3c]
push dword [ebp - 0x20]
call fcn.00429fad
lea ecx, [ebp - 0x3c]
call fcn.0042a211
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
mov dword [ebp - 0x50], vtable.CFileException.0
call fcn.004025e7
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
call fcn.0042a352
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.004297c3
pop ecx
lea ecx, [ebx - 0x10]
call fcn.004025e7
lea ecx, [esi - 0x10]
call fcn.004025e7
cmp dword [ebp - 0x14], edi
je 0x401a07
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x401a14
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x401a21
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
inc eax
call fcn.0043cfe2
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.00401e97
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, 0x48baa8
call fcn.0040c8ce
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025e7
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
mov dword [ebp - 0x50], vtable.CFileException.0
call fcn.004025e7
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
call fcn.0042a352
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025e7
lea ecx, [esi - 0x10]
call fcn.004025e7
cmp dword [ebp - 0x14], edi
je 0x401ab5
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x10], edi
je 0x401ac2
push dword [ebp - 0x10]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x18], edi
je 0x401acf
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
jmp 0x401a24