Function at 0x42a99b
Capabilities:
Check if file exists
Delete file
Get file size
Read file on windows

Disassembly:
push 0x48
mov eax, 0x4ddf8d
call fcn.004b698d
mov dword [ebp - 0x50], ecx
xor ecx, ecx
lea eax, [ebp + 8]
push ecx
push 0x80
push 3
push ecx
mov dword [ebp - 4], ecx
mov bl, cl
cmp dword [ebp + 0x1c], 8
push 1
cmovae eax, dword [ebp + 8]
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
jne 0x42a9fe
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
mov edi, str.CoreTransport::ValidateAndPaveUpgrade
push edi
push str._s:_Could_not_get_a_valid_file_handle:__d.
push 0
push 0
call fcn.00438d22
add esp, 0x14
jmp 0x42aaf2
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push eax
mov dword [ebp - 0x44], eax
call fcn.004b6609
mov esi, eax
pop ecx
mov dword [ebp - 0x54], esi
test esi, esi
mov byte [ebp - 4], 1
mov edi, str.CoreTransport::ValidateAndPaveUpgrade
setne al
test al, al
jne 0x42aa41
push edi
push str._s:_Could_not_allocate_an_input_buffer.
push 0
push 0
xor bl, bl
call fcn.00438d22
add esp, 0x10
jmp 0x42aad3
xor eax, eax
lea ecx, [ebp - 0x28]
push eax
push eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
call fcn.00418d87
push 0
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 2
push eax
push dword [ebp - 0x44]
push esi
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp eax, 1
jne 0x42aac7
lea eax, [ebp - 0x28]
mov edx, esi
push eax
push 1
push dword [ebp - 0x44]
mov ecx, str.MIICIDANBgkqhkiG9w0BAQEFAAOCAg0AMIICCAKCAgEA5l89tyAGJqyk5du_CyrUGbgooDM6UJK0noQVc85MtTTIsbhiuMuW6ijDfc8lb70fXkM6kq1GcmmQXjXpebzjBNvg4IiXSpPslJK_p4f2ulLArQ6Dul7E1dHEgX5N3TVjz62h9P4N82NVnt3PMAlkhc5_Q6n1JnPPNBDSsU72IAdLYU8eqzpiGZ5ul76SfqHoTEmgEJcGsU7sdmtOHN0Rr1tjSl2lVL2CKMJepwXgQNeAkfa93Rsmt0YIb8g42R8tUDutFdMm8G8Djyf_JGbCoM86NwoTr0Cqv_OlGNlbetavTxLqifbNNy9rVYX9M0Yq7NBvdZNEM98VuOS2Uj7CF5BQnzfIxYIXJlaV_58L2K0QPHJ4lBvfP5hDATIJToxXK0QYPjPp3R6_pG8t9vur7eroczK0unhL3i6yH0X38CcmGFm92imHE2jbtjWd5vio6gY4Ze8gMvpK1Bi_XpasnUX1J2jZipaQElDotGqM0LTSDrNfGHsl_1UwJVQES0S5trfyrW7Zrwu1LgeGHCaFhCR_fXe5NfZ125fsoxSMK0rG_TWgjRv8AoUEdMqNMxSCnxW8u9cnEySHe9LpNA_FT_in7kXbYg0copwCcTTYkhkAJlofs7jpqfHX_SKyz_unjwM9VtaQc3njhpq8CZPFZ3UGzS6fMCAQM
call fcn.0042048b
add esp, 0xc
test al, al
je 0x42aac7
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x40]
call fcn.0044f3fb
push eax
lea ecx, [ebp - 0x28]
call fcn.004167a6
push 0
push 1
lea ecx, [ebp - 0x40]
call fcn.00418d87
cmp dword [ebp - 0x18], 0
jbe 0x42aac5
mov ecx, dword [ebp - 0x50]
lea edx, [ebp - 0x28]
push edx
mov ecx, dword [ecx + 0x31c]
mov eax, dword [ecx]
call dword [eax]
mov bl, 1
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.00418d87
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov byte [ebp - 4], 0
test esi, esi
je 0x42aaee
push 1
push esi
call fcn.004b65fb
pop ecx
pop ecx
test bl, bl
jne 0x42ab36
push edi
push str._s:_Upgrade_package_verification_failed__Please_report_this_error.
push 0
push 0
call fcn.00438d22
add esp, 0x10
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x42ab36
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
je 0x42ab36
push str.Failed_to_delete_invalid_upgrade_package__Please_report_this_error.
push 0
push 0
call fcn.00438d22
add esp, 0xc
push 0
push 1
lea ecx, [ebp + 8]
call fcn.0042889e
mov al, bl
call fcn.004b6937
ret 0x18