Function at 0x42d571
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes

Disassembly:
push 0x40
mov eax, 0x4ae76c
call fcn.00469698
xor ebx, ebx
lea ecx, [ebp - 0x3c]
push str.ExtractPatch...
mov dword [ebp - 0x20], ebx
call fcn.00402829
push ebx
push 2
lea edx, [ebp - 0x3c]
mov dword [ebp - 4], ebx
pop ecx
call fcn.00414cf1
pop ecx
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 1
call fcn.0044f841
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402899
mov byte [ebp - 4], 2
call fcn.0044f841
push eax
lea ecx, [ebp - 0x30]
call fcn.00402899
mov byte [ebp - 4], 3
call fcn.0044f841
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402899
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 4
mov eax, dword [esi]
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402d9f
pop ecx
lea edi, [eax + 0x10]
mov dword [ebp - 0x34], edi
mov byte [ebp - 4], 5
cmp dword [ebp - 0x14], ebx
je 0x42d614
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push eax
push ebx
push edi
call dword [sym.imp.msi.dll_MsiOpenProductW]
test eax, eax
je 0x42d659
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x48]
push str.MsiOpenDatabase___failed:
push eax
call fcn.004023f1
add esp, 0xc
xor ecx, ecx
mov byte [ebp - 4], 6
mov ebx, 0x1fcfc
mov edx, eax
push ebx
inc ecx
call fcn.00414dc6
pop ecx
mov ecx, dword [ebp - 0x48]
jmp 0x42d812
push str.PatchFileName
lea ecx, [ebp - 0x3c]
call fcn.00402829
mov byte [ebp - 4], 7
lea eax, [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x3c]
push eax
mov dword [ebp - 0x20], 1
call fcn.00449841
pop ecx
test eax, eax
jne 0x42d691
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 0xd], bl
cmp dword [eax - 0xc], 0
jne 0x42d695
mov byte [ebp - 0xd], 1
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp byte [ebp - 0xd], 0
lea ecx, [ebp - 0x3c]
je 0x42d6c3
push str.get_PatchFileName_property_failed
call fcn.00402829
mov byte [ebp - 4], 8
jmp 0x42d7fd
push str.PatchFileName_property:
call fcn.00402829
push ebx
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 9
push eax
push 2
lea edx, [ebp - 0x3c]
pop ecx
call fcn.004145c0
pop ecx
pop ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
push str.PatchFileSize
lea ecx, [ebp - 0x3c]
call fcn.00402829
mov byte [ebp - 4], 0xa
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x3c]
push eax
mov dword [ebp - 0x20], 2
call fcn.00449841
pop ecx
test eax, eax
jne 0x42d72a
mov eax, dword [ebp - 0x30]
mov byte [ebp - 0xd], bl
cmp dword [eax - 0xc], 0
jne 0x42d72e
mov byte [ebp - 0xd], 1
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp byte [ebp - 0xd], 0
lea ecx, [ebp - 0x3c]
je 0x42d75c
push str.get_PatchFileSize_property_failed
call fcn.00402829
mov byte [ebp - 4], 0xb
jmp 0x42d7fd
push str.PatchFileSize_property:
call fcn.00402829
push ebx
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 0xc
push eax
push 2
lea edx, [ebp - 0x3c]
pop ecx
call fcn.004145c0
pop ecx
pop ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
push dword [ebp - 0x30]
call fcn.00489a5c
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov dword [esp], str.PatchFileURL
call fcn.00402829
mov byte [ebp - 4], 0xd
lea eax, [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x38]
push eax
mov dword [ebp - 0x20], 4
call fcn.00449841
pop ecx
test eax, eax
jne 0x42d7d0
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 0xd], bl
cmp dword [eax - 0xc], 0
jne 0x42d7d4
mov byte [ebp - 0xd], 1
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp byte [ebp - 0xd], 0
je 0x42d81f
push str.get_PatchFileURL_property_failed
lea ecx, [ebp - 0x3c]
call fcn.00402829
mov byte [ebp - 4], 0xe
xor ecx, ecx
lea edx, [ebp - 0x3c]
mov ebx, 0x1fcfc
inc ecx
push ebx
call fcn.00414dc6
pop ecx
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
jmp 0x42dd7d
push str.PatchFileURL_property:
lea ecx, [ebp - 0x38]
call fcn.00402829
push ebx
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 0xf
push eax
push 2
lea edx, [ebp - 0x38]
pop ecx
call fcn.004145c0
pop ecx
pop ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov esi, dword [esi]
lea eax, [ebp - 0x1c]
add esi, 0x20
push eax
mov ecx, esi
mov dword [ebp - 0x48], esi
call fcn.00402e14
mov eax, dword [ebp - 0x3c]
lea ecx, [esi + 8]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
add eax, 0x10
push eax
call fcn.00402e14
lea eax, [ebp - 0x2c]
lea ecx, [esi + 0xc]
push eax
call fcn.00402e14
push 1
push dword [ebp + 8]
mov ecx, 0x516128
call fcn.0041ea0c
test eax, eax
jne 0x42dd48
push ebx
push dword [ebp + 8]
mov ecx, 0x516128
call fcn.0041ea0c
test eax, eax
jne 0x42dd48
call fcn.0044f841
push eax
lea ecx, [ebp - 0x28]
call fcn.00402899
push str.ArchiveName
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0x11
call fcn.00402829
mov byte [ebp - 4], 0x12
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x38]
push eax
mov dword [ebp - 0x20], 8
call fcn.00449841
mov esi, dword [ebp - 0x28]
pop ecx
test eax, eax
jne 0x42d8fe
cmp dword [esi - 0xc], 0
mov byte [ebp - 0xd], bl
jne 0x42d902
mov byte [ebp - 0xd], 1
mov dword [ebp - 4], 0x11
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp byte [ebp - 0xd], 0
je 0x42d94d
push str.get_ArchiveName_property_failed
lea ecx, [ebp - 0x3c]
call fcn.00402829
xor ecx, ecx
mov byte [ebp - 4], 0x13
mov ebx, 0x1fcfc
lea edx, [ebp - 0x3c]
push ebx
inc ecx
call fcn.00414dc6
pop ecx
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
jmp 0x42dd40
push str.ArchiveName_property:
lea ecx, [ebp - 0x38]
call fcn.00402829
push ebx
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0x14
push eax
push 2
lea edx, [ebp - 0x38]
pop ecx
call fcn.004145c0
pop ecx
pop ecx
mov byte [ebp - 4], 0x11
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00402e64
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
mov eax, dword [0x516134]
add eax, 0xfffffff0
push eax
call fcn.00402d9f
pop ecx
lea edi, [eax + 0x10]
mov dword [ebp - 0x38], edi
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 0x15
push ebx
push eax
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x34]
call fcn.004019f8
pop ecx
pop ecx
test eax, eax
jne 0x42d9e5
push str.extract_archive_failed
lea ecx, [ebp - 0x3c]
call fcn.00402829
xor ecx, ecx
mov byte [ebp - 4], 0x16
mov ebx, 0x1fbd0
lea edx, [ebp - 0x3c]
push ebx
inc ecx
call fcn.00414dc6
pop ecx
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
jmp 0x42dd2d
call fcn.0044f841
push eax
lea ecx, [ebp - 0x20]
call fcn.00402899
push ebx
mov byte [ebp - 4], 0x17
call fcn.00487e7e
pop ecx
push eax
call fcn.00487de9
pop ecx
call fcn.00487dc8
push eax
push edi
lea eax, [ebp - 0x20]
push str._s_d
push eax
call fcn.004027d2
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.004024b8
add esp, 0x1c
mov byte [ebp - 4], 0x18
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 0x3c]
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00401ecd
pop ecx
pop ecx
push dword [ebp - 0x40]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test esi, esi
jne 0x42daa8
push ecx
mov ebx, esp
mov dword [ebp - 0x48], ebx
mov esi, dword [ebp - 0x20]
lea eax, [esi - 0x10]
push eax
call fcn.00402d9f
pop ecx
add eax, 0x10
xor ecx, ecx
mov dword [ebx], eax
call fcn.004490e1
lea ecx, [ebp - 0x3c]
mov dword [esp], str.extract_Patch_failed
call fcn.00402829
xor ecx, ecx
mov byte [ebp - 4], 0x19
mov ebx, 0x1fbd0
lea edx, [ebp - 0x3c]
push ebx
inc ecx
call fcn.00414dc6
pop ecx
mov ecx, dword [ebp - 0x3c]
jmp 0x42dd17
push 0x4cdd40
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00402459
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0x1a
push ecx
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.004024b8
add esp, 0xc
mov byte [ebp - 4], 0x1c
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.00402e64
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x42db41
push ecx
mov ebx, esp
mov dword [ebp - 0x48], ebx
mov esi, dword [ebp - 0x20]
lea eax, [esi - 0x10]
push eax
call fcn.00402d9f
pop ecx
add eax, 0x10
xor ecx, ecx
mov dword [ebx], eax
call fcn.004490e1
pop ecx
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x48]
push str.file_not_found_after_extraction:
push eax
call fcn.004023f1
add esp, 0xc
xor ecx, ecx
mov byte [ebp - 4], 0x1d
mov ebx, 0x1fbd0
mov edx, eax
push ebx
inc ecx
call fcn.00414dc6
pop ecx
mov ecx, dword [ebp - 0x48]
jmp 0x42dd0c
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004024b8
add esp, 0xc
push ebx
mov byte [ebp - 4], 0x1e
push dword [ebp - 0x18]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, dword [ebp - 0x20]
test eax, eax
jne 0x42dba8
push str.failed_to_copy_extracted_Patch__will_use_it_directly
lea ecx, [ebp - 0x44]
call fcn.00402829
xor ecx, ecx
mov byte [ebp - 4], 0x1f
push ebx
lea edx, [ebp - 0x44]
inc ecx
call fcn.00414cf1
pop ecx
mov byte [ebp - 4], 0x1e
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00402e64
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
call fcn.00402e14
jmp 0x42dbc7
push ecx
lea eax, [esi - 0x10]
mov ebx, esp
push eax
mov dword [ebp - 0x44], ebx
call fcn.00402d9f
add eax, 0x10
mov dword [ebx], eax
xor ebx, ebx
pop ecx
mov ecx, ebx
call fcn.004490e1
pop ecx
lea eax, [ebp - 0x1c]
mov ecx, 0x515f84
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00440b6d
mov byte [ebp - 4], 0x20
push dword [ebp - 0x44]
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x18]
call fcn.0042f189
pop ecx
mov byte [ebp - 4], 0x1e
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
mov dword [ebp - 0x3c], eax
call fcn.00402e64
cmp dword [ebp - 0x3c], 0
jne 0x42dc54
push str.extracted_Patch_is_valid:
lea ecx, [ebp - 0x44]
call fcn.00402829
push ebx
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0x21
push eax
push 2
lea edx, [ebp - 0x44]
pop ecx
call fcn.004145c0
pop ecx
pop ecx
mov byte [ebp - 4], 0x1e
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x18]
push eax
add ecx, 4
call fcn.00402e14
mov eax, dword [ebp - 0x48]
mov dword [eax + 0x14], 1
jmp 0x42dd09
push dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
call fcn.00409e7b
test eax, eax
jne 0x42dc82
push ecx
lea eax, [esi - 0x10]
mov ebx, esp
push eax
mov dword [ebp - 0x48], ebx
call fcn.00402d9f
add eax, 0x10
mov dword [ebx], eax
xor ebx, ebx
pop ecx
mov ecx, ebx
call fcn.004490e1
pop ecx
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], bl
mov ebx, dword [ebp - 0x3c]
mov ecx, 0x515e58
push eax
push ebx
push str.Signature_Validation_Error
call fcn.0040a240
push str.removed_extraction_folder__invalid_after_extraction:
lea ecx, [ebp - 0x48]
call fcn.00402829
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0x22
xor ecx, ecx
lea edx, [ebp - 0x48]
push ebx
push eax
inc ecx
call fcn.004145c0
pop ecx
pop ecx
mov byte [ebp - 4], 0x1e
mov ecx, dword [ebp - 0x48]
lea ecx, [ecx - 0x10]
call fcn.00402e64
push str.Patch_invalid_after_extraction
lea ecx, [ebp - 0x48]
call fcn.00402829
mov byte [ebp - 4], 0x23
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x48]
mov ecx, 0x5163b4
push eax
push 0x1fc98
call fcn.00412ea3
mov ecx, dword [ebp - 0x48]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ebx, 0x1fbd0
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x24]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x40]
lea ecx, [ecx - 0x10]
call fcn.00402e64
lea ecx, [esi - 0x10]
call fcn.00402e64
lea ecx, [edi - 0x10]
call fcn.00402e64
mov edi, dword [ebp - 0x34]
mov esi, dword [ebp - 0x28]
lea ecx, [esi - 0x10]
jmp 0x42d815
push str.File_already_exist_and_valid:
lea ecx, [ebp - 0x48]
call fcn.00402829
push ebx
lea eax, [esi + 4]
mov byte [ebp - 4], 0x10
push eax
push 2
lea edx, [ebp - 0x48]
pop ecx
call fcn.004145c0
pop ecx
pop ecx
mov ecx, dword [ebp - 0x48]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov dword [esi + 0x14], 1
lea ecx, [edi - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp dword [ebp - 0x14], 0
je 0x42ddb5
push dword [ebp - 0x14]
call dword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
mov eax, ebx
call fcn.00469661
ret 4