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

Disassembly:
push 0x48
mov eax, 0x52b578
call fcn.004e49d2
mov dword [ebp - 0x50], ecx
mov edi, dword [ebp + 8]
xor bl, bl
cmp dword [edi + 0x14], 8
jb 0x428980
mov eax, dword [edi]
jmp 0x428982
mov eax, edi
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
jne 0x4289c5
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.CoreTransport::ValidateAndPaveUpgrade
push str._s:_Could_not_get_a_valid_file_handle:__d.
xor esi, esi
push esi
push esi
call fcn.0043a0a0
add esp, 0x14
jmp 0x428aae
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
push eax
mov dword [ebp - 0x44], eax
call fcn.004e461a
mov esi, eax
pop ecx
mov dword [ebp - 0x54], esi
xor eax, eax
mov dword [ebp - 4], eax
test esi, esi
jne 0x428a01
push str.CoreTransport::ValidateAndPaveUpgrade
push str._s:_Could_not_allocate_an_input_buffer.
push eax
push eax
mov bl, al
call fcn.0043a0a0
add esp, 0x10
jmp 0x428a8d
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x28], al
push eax
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 1
push eax
push dword [ebp - 0x44]
push esi
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp eax, 1
jne 0x428a81
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.0041e404
add esp, 0xc
test al, al
je 0x428a81
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x40]
call fcn.0045b1ba
push eax
lea ecx, [ebp - 0x28]
call fcn.00414765
push 0
push 1
lea ecx, [ebp - 0x40]
call fcn.00416ab1
cmp dword [ebp - 0x18], 0
jbe 0x428a7f
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.00416ab1
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x428aa8
push 1
push esi
call fcn.004e460c
pop ecx
pop ecx
test bl, bl
jne 0x428aef
xor esi, esi
push str.CoreTransport::ValidateAndPaveUpgrade
push str._s:_Upgrade_package_verification_failed__Please_report_this_error.
push esi
push esi
call fcn.0043a0a0
add esp, 0x10
cmp dword [edi + 0x14], 8
jb 0x428aca
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x428aef
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 2
je 0x428aef
push str.Failed_to_delete_invalid_upgrade_package__Please_report_this_error.
push esi
push esi
call fcn.0043a0a0
add esp, 0xc
mov al, bl
call fcn.004e497c
ret 4