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

Disassembly:
push 0x48
mov eax, 0x45f1f8
call fcn.00447d5b
push str.Extract7zArchiveFromMsiContainer...
lea ecx, [ebp - 0x24]
call fcn.00402060
xor edi, edi
push edi
lea eax, [ebp - 0x24]
push eax
push 2
pop ebx
push ebx
mov dword [ebp - 4], edi
call fcn.00411fad
mov ecx, dword [ebp - 0x24]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.0040253e
mov dword [ebp - 4], 1
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea ecx, [ebp - 0x1c]
push ecx
push edi
push eax
mov dword [ebp - 0x1c], edi
call sub.msi.dll_MsiOpenProductW
mov esi, eax
cmp esi, edi
je 0x401717
push str.MsiOpenDatabase__
lea ecx, [ebp + 8]
call fcn.00402060
push esi
lea eax, [ebp + 8]
push eax
push 1
mov byte [ebp - 4], 4
call fcn.00411fad
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov esi, eax
call fcn.0040253e
cmp dword [ebp - 0x18], edi
je 0x4016f6
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x14], edi
je 0x401703
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x1c], edi
je 0x401710
push dword [ebp - 0x1c]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, esi
jmp 0x401a08
call fcn.00434582
push eax
lea ecx, [ebp - 0x28]
call fcn.0040210b
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 5
push dword [eax]
lea eax, [ebp - 0x28]
push str.SELECT__FROM__Binary__WHERE__Name__s
push eax
call fcn.0040202c
add esp, 0xc
cmp dword [ebp - 0x14], edi
je 0x40174c
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov esi, dword [ebp - 0x28]
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x14], edi
call sub.msi.dll_MsiEnumClientsA
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x4017cb
push str.MsiDatabaseOpenView__
lea ecx, [ebp + 8]
call fcn.00402060
mov byte [ebp - 4], 6
push dword [ebp - 0x24]
lea eax, [ebp + 8]
push eax
push 1
call fcn.00411fad
mov ecx, dword [ebp + 8]
add esp, 0xc
add ecx, 0xfffffff0
mov ebx, eax
call fcn.0040253e
lea ecx, [esi - 0x10]
call fcn.0040253e
cmp dword [ebp - 0x18], edi
je 0x4017aa
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x14], edi
je 0x4017b7
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x1c], edi
je 0x4017c4
push dword [ebp - 0x1c]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
mov eax, ebx
jmp 0x401a08
push edi
push dword [ebp - 0x14]
call sub.msi.dll_MsiViewModify
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x4017ee
push str.MsiViewExecut__
lea ecx, [ebp + 8]
call fcn.00402060
mov byte [ebp - 4], 7
jmp 0x401777
cmp dword [ebp - 0x18], edi
je 0x4017fb
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x18], edi
call sub.msi.dll_MsiDatabaseIsTablePersistentA
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x401827
push str.MsiViewFetch__
lea ecx, [ebp + 8]
call fcn.00402060
mov byte [ebp - 4], 8
jmp 0x401777
push ebx
push dword [ebp - 0x18]
call sub.msi.dll_MsiRecordGetStringW
push eax
mov dword [ebp - 0x30], eax
call main
pop ecx
push dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x20]
push eax
call fcn.00401d7a
add esp, 0xc
push str.___File:
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0xa
call fcn.00402060
push edi
mov byte [ebp - 4], 0xb
push dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
push ebx
call fcn.00411b27
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x2c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.0040253e
push str.___archive_file:
lea ecx, [ebp + 8]
call fcn.00402060
push edi
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 8]
push eax
push ebx
mov byte [ebp - 4], 0xc
call fcn.00411b27
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.0040253e
push dword [ebp - 0x20]
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401916
push 0x80
push dword [ebp - 0x20]
call dword [sym.imp.kernel32.dll_SetFileAttributesW]
push dword [ebp - 0x20]
call dword [sym.imp.kernel32.dll_DeleteFileW]
test eax, eax
jne 0x401916
push str.Failed_to_delete_previous_ARM_update_archive:
lea ecx, [ebp + 8]
call fcn.00402060
push 0x186a0
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 8]
push eax
push 1
mov byte [ebp - 4], 0xd
call fcn.00411b27
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp + 8]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.0040253e
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x24]
push ebx
push dword [ebp - 0x18]
call sub.msi.dll_MsiRecordSetStringA
test eax, eax
jne 0x4019a7
lea ecx, [ebp - 0x40]
call fcn.00434cb1
push edi
push 0xffffffffffffffff
push edi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 0xe
call fcn.00401f93
lea eax, [ebp - 0x54]
push eax
push 0x1001
mov byte [ebp - 4], 0xf
push dword [ebp - 0x20]
lea ecx, [ebp - 0x40]
call main
mov ebx, 0x1fbd0
cmp dword [0x49ccc8], ebx
je 0x401a0e
cmp eax, edi
je 0x401a0e
push dword [ebp - 0x30]
lea ecx, [ebp - 0x40]
push dword [ebp - 0x24]
call main
lea ecx, [ebp - 0x40]
call fcn.00434c4b
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
mov dword [ebp - 0x54], vtable.CFileException.0
call fcn.0040253e
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call fcn.00434d8c
push edi
push 1
push dword [ebp - 0x18]
call sub.msi.dll_MsiReinstallFeatureFromDescriptorA
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
push dword [ebp - 0x1c]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
push dword [ebp - 0x24]
call main
pop ecx
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040253e
lea ecx, [esi - 0x10]
call fcn.0040253e
cmp dword [ebp - 0x18], edi
je 0x4019eb
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x14], edi
je 0x4019f8
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x1c], edi
je 0x401a05
push dword [ebp - 0x1c]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
inc eax
call fcn.00447e33
ret
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
push dword [ebp - 0x1c]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push str.Create_file_failed:
push eax
call fcn.00401dd1
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, 0x49ccc0
call fcn.0041042c
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
call fcn.0040253e
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
mov dword [ebp - 0x54], vtable.CFileException.0
call fcn.0040253e
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xa
call fcn.00434d8c
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040253e
lea ecx, [esi - 0x10]
call fcn.0040253e
cmp dword [ebp - 0x18], edi
je 0x401a99
push dword [ebp - 0x18]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x14], edi
je 0x401aa6
push dword [ebp - 0x14]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
cmp dword [ebp - 0x1c], edi
je 0x401ab3
push dword [ebp - 0x1c]
call sub.msi.dll_MsiConfigureFeatureFromDescriptorA
xor eax, eax
jmp 0x401a08