Function at 0x401220
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40414d
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x408004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 1
push str.._test.msi
mov dword [ebp - 0x18], 0
xor bl, bl
call dword [sym.imp.msi.dll_MsiOpenProductW]
test eax, eax
je 0x401294
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Error_opening_MSI_database.
push 0x402de0
call fcn.00402bb0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
jmp 0x401478
lea eax, [ebp - 0x18]
push eax
push str.INSERT_INTO__Binary____Name____Data___VALUES_______
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiEnumClientsA]
mov edi, dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
test eax, eax
je 0x4012d2
mov edx, str.Error_opening_database_view._2
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x402de0
call fcn.00402bb0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x401462
push 2
call dword [sym.imp.msi.dll_MsiDatabaseExportA]
mov esi, eax
test esi, esi
jne 0x4012e7
mov edx, str.Error_creating_record._3
jmp 0x4012b5
push str.nano.ps1
push 1
push esi
call dword [sym.imp.msi.dll_MsiReinstallFeatureW]
test eax, eax
je 0x40131b
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.Error_setting_name_in_the_record.
push 0x403050
call fcn.00402e10
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
jmp 0x40145f
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.004014a0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], 8
cmovae eax, dword [ebp - 0x30]
push eax
push 2
push esi
call dword [sym.imp.msi.dll_MsiReinstallFeatureFromDescriptorA]
test eax, eax
je 0x4013b3
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Error_loading_for_recording._4
push 0x402de0
call fcn.00402bb0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x1c]
cmp ecx, 8
jb 0x40145f
mov edx, dword [ebp - 0x30]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4013a4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4013f8
push ecx
push edx
call fcn.00403415
add esp, 8
jmp 0x40145f
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x1c]
cmp ecx, 8
jb 0x401408
mov edx, dword [ebp - 0x30]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4013fe
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4013fe
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00403415
add esp, 8
push esi
push dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], ax
call dword [sym.imp.msi.dll_MsiViewModify]
test eax, eax
je 0x401449
mov edx, str.Representation_of_the_execution_of_the_error._5
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x402de0
call fcn.00402bb0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x40145f
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiDatabaseGenerateTransformW]
test eax, eax
je 0x40145d
mov edx, str.An_error_occurred_while_committing_changes_to_the_database._6
jmp 0x40142f
mov bl, 1
push esi
call edi
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40146c
push eax
call edi
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x401476
push ecx
call edi
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004033d7
mov esp, ebp
pop ebp
ret 0xc