Function at 0x14000efb0
Capabilities:
Delete file

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [rsp - 0x1b0]
sub rsp, 0x2b0
mov rax, qword [0x14002e008]
xor rax, rsp
mov qword [rbp + 0x190], rax
mov rsi, rdx
mov qword [rsp + 0x48], r9
mov edx, 0x2f
mov rbx, r8
mov r12, rcx
call qword [sym.imp.VCRUNTIME140.dll_strrchr]
mov rdi, rax
test rax, rax
jne 0x14000f00c
lea rcx, str.ERROR:_cant_get_local_filename_for_firmware_ipsw_n
call fcn.1400023a0
lea eax, [rdi - 2]
jmp 0x14000f34c
mov qword [rsp + 0x2e8], r13
lea rcx, [rbp - 0x70]
inc rdi
mov qword [rsp + 0x2a8], r14
mov qword [rsp + 0x2a0], r15
test rbx, rbx
je 0x14000f044
mov r9, rdi
lea rdx, str._s__s
mov r8, rbx
call fcn.1400059e0
jmp 0x14000f053
mov r8, rdi
lea rdx, [0x14002374c]
call fcn.1400059e0
lea r8, [rbp - 0x70]
lea rdx, str._s.lock
lea rcx, [rbp + 0x90]
call fcn.1400059e0
xor ebx, ebx
lea rcx, [rbp + 0x90]
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov dword [rsp + 0x20], 4
lea r8d, [rbx + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
jne 0x14000f0ba
lea rdx, [rbp + 0x90]
lea rcx, str.ERROR:_could_not_open_or_create_lockfile__s_n
call fcn.140002440
jmp 0x14000f10f
mov r9d, 1
mov qword [rsp + 0x68], rbx
lea rcx, [rsp + 0x58]
xor r8d, r8d
mov qword [rsp + 0x28], rcx
mov rcx, rax
mov dword [rsp + 0x20], ebx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x14000f122
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR:_cant_lock_file__error__d_n
call fcn.140002440
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], 0xffffffffffffffff
lea rdx, [rbp + 0x90]
lea rcx, str.WARNING:_Could_not_lock_file__s_n
call fcn.1400023a0
xorps xmm0, xmm0
lea rdx, [0x14001dbf4]
xor eax, eax
lea rcx, [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov r14d, ebx
movups xmmword [rsp + 0x78], xmm0
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov r15, qword [rbp - 0x80]
mov rbx, rax
mov r13, qword [rsp + 0x78]
test rax, rax
je 0x14000f1be
cmp r13, qword [rsi]
jne 0x14000f16b
cmp r15, qword [rsi + 8]
jne 0x14000f16b
mov rax, qword [rsp + 0x40]
cmp eax, dword [rsi + 0x10]
je 0x14000f1b3
lea rdx, [rbp - 0x70]
lea rcx, str.Verifying__s..._n
call fcn.140002320
mov rdx, rsi
mov rcx, rbx
call fcn.14000eea0
test eax, eax
je 0x14000f1a1
lea rcx, str.Checksum_matches._n
call fcn.140002320
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x14000f1c4
lea rcx, str.Checksum_does_not_match._n
call fcn.140002320
mov r14d, 1
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x14000f1c4
mov r14d, 1
xor ebx, ebx
test r14d, r14d
mov r14, qword [rsp + 0x2a8]
je 0x14000f2be
lea r8d, [rbx + 0xa]
mov rcx, r12
lea rdx, str.protected:
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x14000f208
mov rdx, rdi
lea rcx, str.ERROR:_Cant_download__s_because_it_needs_a_purchase._n
call fcn.1400023a0
mov ebx, 0xfffffffd
jmp 0x14000f2d0
lea rcx, [rbp - 0x70]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
mov rdx, r12
lea rcx, str.Downloading_firmware___s__n
call fcn.140002320
mov r8d, 1
lea rdx, [rbp - 0x70]
mov rcx, r12
call fcn.140003dc0
cmp qword [rsi], r13
jne 0x14000f248
cmp qword [rsi + 8], r15
jne 0x14000f248
mov rax, qword [rsp + 0x40]
cmp dword [rsi + 0x10], eax
je 0x14000f2be
lea rdx, [rbp - 0x70]
lea rcx, str._nVerifying__s..._n
call fcn.140002320
lea rdx, [0x14001dbf4]
lea rcx, [rbp - 0x70]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
je 0x14000f369
mov rdx, rsi
mov rcx, rax
call fcn.14000eea0
test eax, eax
je 0x14000f292
lea rcx, str.Checksum_matches._n
call fcn.140002320
jmp 0x14000f2a3
lea rcx, str.ERROR:_File_download_failed__checksum_mismatch_._n
call fcn.1400023a0
mov ebx, 0xfffffffc
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test ebx, ebx
jns 0x14000f2bc
lea rcx, [rbp - 0x70]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
test ebx, ebx
jne 0x14000f2d0
lea rcx, [rbp - 0x70]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rcx, qword [rsp + 0x48]
mov qword [rcx], rax
mov rcx, qword [rsp + 0x50]
mov r15, qword [rsp + 0x2a0]
mov r13, qword [rsp + 0x2e8]
cmp rcx, 0xffffffffffffffff
je 0x14000f337
xor eax, eax
xor r9d, r9d
mov qword [rsp + 0x68], rax
xor edx, edx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_UnlockFileEx]
test eax, eax
jne 0x14000f383
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ERROR:_cant_unlock_file__error__d_n
call fcn.140002440
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], 0xffffffffffffffff
lea rdx, [rbp + 0x90]
lea rcx, str.WARNING:_Could_not_unlock_file__s_n
call fcn.1400023a0
mov eax, ebx
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.14001bfa0
add rsp, 0x2b0
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, [rbp - 0x70]
lea rcx, str.ERROR:_Cant_open__s_for_checksum_verification_n
call fcn.1400023a0
mov ebx, 0xfffffffb
jmp 0x14000f2d0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14000f34a