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

Disassembly:
push 0x54
mov eax, 0x484da8
call fcn.00464e48
mov esi, edx
mov dword [ebp - 0x28], esi
mov edi, ecx
mov dword [ebp - 0x30], edi
push str.Extract7zArchiveFromMsiContainer.._archive_name:
lea ecx, [ebp - 0x2c]
call fcn.0040279b
xor ebx, ebx
lea edx, [ebp - 0x2c]
push ebx
push esi
push 2
pop ecx
mov dword [ebp - 4], ebx
call fcn.00413900
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00402def
push 0x49c56c
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0xd], 1
call fcn.0040279b
lea eax, [ebp - 0xd]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040c173
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov dword [ebp - 4], 2
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 4
push eax
push ebx
push dword [edi]
mov dword [ebp - 0x20], ebx
call dword [sym.imp.msi.dll_MsiOpenProductW]
mov edi, eax
test edi, edi
je 0x401a4e
push str.MOD_failed:
lea ecx, [ebp - 0x2c]
call fcn.0040279b
xor ecx, ecx
mov byte [ebp - 4], 5
push edi
lea edx, [ebp - 0x2c]
inc ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
jmp 0x401e23
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402824
mov byte [ebp - 4], 6
lea eax, [ebp - 0x2c]
push dword [esi]
push str.SELECT__FROM__Binary__WHERE__Name__s
push eax
call fcn.00402762
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x401a82
push dword [ebp - 0x18]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
mov esi, dword [ebp - 0x2c]
lea eax, [ebp - 0x18]
push eax
push esi
push dword [ebp - 0x20]
mov dword [ebp - 0x18], ebx
call dword [sym.imp.msi.dll_MsiEnumClientsA]
mov edi, eax
test edi, edi
je 0x401aaf
push str.MDOV_failed:
lea ecx, [ebp - 0x28]
call fcn.0040279b
mov byte [ebp - 4], 7
jmp 0x401b08
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.msi.dll_MsiViewModify]
mov edi, eax
test edi, edi
je 0x401ad2
push str.MVE_failed:
lea ecx, [ebp - 0x28]
call fcn.0040279b
mov byte [ebp - 4], 8
jmp 0x401b08
cmp dword [ebp - 0x14], 0
je 0x401ae1
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push eax
push dword [ebp - 0x18]
call dword [sym.imp.msi.dll_MsiDatabaseIsTablePersistentA]
mov edi, eax
test edi, edi
je 0x401b1d
push str.MVF_failed:
lea ecx, [ebp - 0x28]
call fcn.0040279b
mov byte [ebp - 4], 9
xor ecx, ecx
lea edx, [ebp - 0x28]
push edi
inc ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x28]
jmp 0x401e18
push 2
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiRecordGetStringW]
mov edi, dword [ebp - 0x28]
push edi
push dword [ebp + 8]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00402448
add esp, 0xc
push dword [ebp + 0xc]
mov byte [ebp - 4], 0xb
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x401b5a
push dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
call fcn.0040252d
push str.___File:
lea ecx, [ebp - 0x28]
call fcn.0040279b
push ebx
mov byte [ebp - 4], 0xc
lea edx, [ebp - 0x28]
push dword [ebp - 0x30]
push 2
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.00402def
push str.___archive_file:
lea ecx, [ebp - 0x28]
call fcn.0040279b
push ebx
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0xd
push eax
push 2
lea edx, [ebp - 0x28]
pop ecx
call fcn.00413900
pop ecx
pop ecx
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.00402def
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401c91
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x401c91
push str.Failed_to_delete_existing_archive:
lea ecx, [ebp - 0x28]
call fcn.0040279b
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0xe
xor ecx, ecx
lea edx, [ebp - 0x28]
push 0x186a0
push eax
inc ecx
call fcn.00413900
pop ecx
pop ecx
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.00402def
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x28]
call fcn.00402824
push ebx
mov byte [ebp - 4], 0xf
call fcn.0046bc6c
pop ecx
push eax
call fcn.0046bbd7
pop ecx
call fcn.0046bbb6
push eax
push dword [edi]
lea eax, [ebp - 0x28]
push str._s_d
push eax
call fcn.00402762
add esp, 0x10
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.00402d9f
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x30]
push eax
call fcn.00402448
add esp, 0xc
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x10
call fcn.00402d9f
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x28]
lea ecx, [ecx - 0x10]
call fcn.00402def
lea ecx, [ebp - 0x48]
call fcn.0044b0e0
push ebx
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0x11
call fcn.00402653
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 0x12
push eax
push 0x1001
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x48]
call fcn.0044b650
cmp dword [0x4e24d4], 0x1fbd0
je 0x401dac
test eax, eax
je 0x401dac
mov eax, 0x989680
push eax
mov dword [ebp - 0x24], eax
call fcn.0044a8a2
pop ecx
mov edi, eax
lea eax, [ebp - 0x24]
push eax
push edi
push 2
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiRecordSetStringA]
test eax, eax
jne 0x401d7a
mov esi, ebx
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x401d77
push eax
push edi
lea ecx, [ebp - 0x48]
add esi, eax
call fcn.0044ba20
movd xmm1, esi
mov eax, esi
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
mov dword [ebp - 0x24], 0x989680
addsd xmm1, qword [eax*8 + 0x4cc0b0]
mov eax, dword [ebp - 0x34]
mulsd xmm1, qword [0x4cc090]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4cc0b0]
divsd xmm1, xmm0
cvttsd2si eax, xmm1
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
call fcn.0040c20e
lea eax, [ebp - 0x24]
push eax
push edi
push 2
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiRecordSetStringA]
test eax, eax
je 0x401d00
mov esi, dword [ebp - 0x2c]
lea ecx, [ebp - 0x48]
call fcn.0044b3a0
push ebx
push 1
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiReinstallFeatureFromDescriptorA]
push dword [ebp - 0x18]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
push dword [ebp - 0x20]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
push edi
call fcn.0044a89d
xor ebx, ebx
pop ecx
inc ebx
jmp 0x401dfb
push dword [ebp - 0x18]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
push dword [ebp - 0x20]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
push str.Create_file_failed:
push eax
call fcn.00402381
add esp, 0xc
mov edi, eax
mov byte [ebp - 4], 0x13
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x1fbd0
mov ecx, 0x4e24cc
call fcn.004121e3
mov ecx, dword [ebp - 0x34]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x5c], vtable.CFileException.0
lea ecx, [ecx - 0x10]
call fcn.00402def
lea ecx, [ebp - 0x48]
call fcn.0044b110
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00402def
lea ecx, [esi - 0x10]
call fcn.00402def
cmp dword [ebp - 0x14], 0
je 0x401e37
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
cmp dword [ebp - 0x18], 0
je 0x401e46
push dword [ebp - 0x18]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
cmp dword [ebp - 0x20], 0
je 0x401e55
push dword [ebp - 0x20]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
mov eax, ebx
call fcn.00464e11
ret