Function at 0x408570
Capabilities:
Create directory
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe5c
mov eax, dword [0x436008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0xe50], ebx
mov dword [ebp - 0xe58], eax
mov dword [ebp - 0xe48], eax
push esi
push edi
test ebx, ebx
je 0x40ac77
mov ecx, dword [ebx]
mov eax, ecx
and eax, 0x108
cmp eax, 0x108
jne 0x4085be
push str.ERROR:_FLAG_LATEST_cannot_be_used_with_FLAG_CUSTOM._n
jmp 0x40ac6f
cmp dword [ebx + 0x30], 0
jne 0x4085d6
test ecx, 0x120
jne 0x4085d6
push str.ERROR:_no_ipsw_file_given_n
jmp 0x40ac6f
test cl, 2
je 0x4085ef
mov dword [0x4486b4], 1
mov dword [0x4486c4], 1
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40860b
push dword [ebx + 0x68]
xorps xmm0, xmm0
sub esp, 8
movsd qword [esp], xmm0
push 0
call eax
add esp, 0x10
mov ecx, ebx
call fcn.0040af00
test eax, eax
jns 0x408639
push 0x43ab28
call fcn.00404d10
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40865a
push dword [ebx + 0x68]
movsd xmm0, qword [0x432ce0]
sub esp, 8
movsd qword [esp], xmm0
push 0
call eax
add esp, 0x10
mov eax, dword [ebx + 0x4c]
push dword [eax + 4]
push 0x43ab78
call fcn.00404cb0
mov eax, dword [ebx + 0x4c]
add esp, 8
mov edi, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
cmp dword [eax], 0
jne 0x40892f
mov ecx, ebx
mov dword [ebp - 0xe40], 0
call fcn.004056d0
test eax, eax
je 0x40869e
push str.ERROR:_Could_not_open_device_in_WTF_mode_n
jmp 0x40ac6f
lea edx, [ebp - 0xe40]
mov ecx, ebx
call fcn.00405be0
test eax, eax
js 0x408947
mov eax, dword [ebp - 0xe40]
test eax, eax
je 0x408947
push eax
lea eax, [ebp - 0x148]
push str.Firmware_dfu_WTF.s5l_04xxall.RELEASE.dfu
push eax
call fcn.00403e30
mov ecx, dword [ebx + 0x30]
lea eax, [ebp - 0xe44]
add esp, 0xc
mov dword [ebp - 0xe34], 0
lea edx, [ebp - 0x148]
mov dword [ebp - 0xe44], 0
push eax
lea eax, [ebp - 0xe34]
push eax
call fcn.0040fa80
mov esi, dword [ebp - 0xe34]
add esp, 8
test esi, esi
jne 0x4088e9
mov ecx, ebx
call fcn.004081b0
push 0x43ac1c
push 0x43ac28
push str.304218112
push 0x43ac38
push str.RecoverySoftwareVersions
push 0x43ac58
push 0x43ac5c
push 7
push dword [ebx + 0xc]
mov dword [ebp - 0xe40], esi
call sym.fixios.exe_plist_access_path
mov esi, eax
add esp, 0x24
test esi, esi
je 0x408788
push esi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 3
jne 0x408788
lea eax, [ebp - 0xe40]
push eax
push esi
call sym.fixios.exe_plist_get_string_val
mov esi, dword [ebp - 0xe40]
add esp, 8
mov dword [ebp - 0xe40], esi
test esi, esi
jne 0x4087ab
push str.Using_hardcoded_x12220000_5_Recovery.ipsw_URL_n
call fcn.00404cb0
add esp, 4
push str.http:__appldnld.apple.com.edgesuite.net_content.info.apple.com_iPhone_061_6618.20090617.Xse7Y_x12220000_5_Recovery.ipsw
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov esi, eax
add esp, 4
mov dword [ebp - 0xe40], esi
push 0x2f
push esi
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
mov edx, str.x12220000_5_Recovery.ipsw
test eax, eax
lea ecx, [eax + 1]
mov eax, dword [ebx + 0x60]
cmove ecx, edx
mov dword [ebp - 0xe4c], ecx
test eax, eax
je 0x408876
lea ecx, [ebp - 0xdf8]
push ecx
push eax
call edi
add esp, 8
test eax, eax
jns 0x4087f3
mov ecx, dword [ebx + 0x60]
mov edx, 0x1ed
call fcn.004050f0
mov ecx, dword [ebx + 0x60]
lea edx, [ebp - 0x5c8]
sub edx, ecx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x408800
mov edx, 0x43ad48
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x408814
lea edi, [ebp - 0x5c8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408824
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0xe4c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x408842
lea edi, [ebp - 0x5c8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408852
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0xe40]
mov edi, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
jmp 0x40888d
lea edx, [ebp - 0x5c8]
sub edx, ecx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x408880
lea eax, [ebp - 0xdf8]
push eax
lea eax, [ebp - 0x5c8]
push eax
call edi
add esp, 8
test eax, eax
je 0x4088b6
push 0
lea edx, [ebp - 0x5c8]
mov ecx, esi
call fcn.004062b0
add esp, 4
lea eax, [ebp - 0xe44]
push eax
lea eax, [ebp - 0xe34]
push eax
lea edx, [ebp - 0x148]
lea ecx, [ebp - 0x5c8]
call fcn.0040fa80
mov esi, dword [ebp - 0xe34]
add esp, 8
test esi, esi
jne 0x4088e9
push str.ERROR:_Could_not_extract_WTF_n
jmp 0x408904
push dword [ebp - 0xe44]
mov edx, esi
mov ecx, ebx
call fcn.004058d0
add esp, 4
test eax, eax
je 0x40890c
push str.ERROR:_Could_not_send_WTF..._n
call fcn.00404d10
add esp, 4
mov ecx, ebx
call fcn.004057a0
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
mov dword [ebx + 0x4c], 0x439060
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ecx, ebx
call fcn.0040afa0
mov dword [ebx + 0x44], eax
test eax, eax
jne 0x40896f
push str.ERROR:_Unable_to_discover_device_type_n
jmp 0x40ac6f
push str.ERROR:_Could_not_get_CPID_for_WTF_mode_device_n
call fcn.00404d10
add esp, 4
mov ecx, ebx
call fcn.004057a0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x408990
push dword [ebx + 0x68]
movsd xmm0, qword [0x432ce8]
sub esp, 8
movsd qword [esp], xmm0
push 0
call eax
add esp, 0x10
mov eax, dword [ebx + 0x44]
push dword [eax]
push dword [eax + 4]
push str.Identified_device_as__s___s_n
call fcn.00404cb0
mov edx, dword [ebx]
add esp, 0xc
mov ecx, edx
and ecx, 0x20
je 0x4089c0
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 1
je 0x4089c0
push str.ERROR:_you_need_to_put_your_device_into_DFU_mode_to_pwn_it._n
jmp 0x40ac6f
test ecx, ecx
je 0x408a68
mov ecx, ebx
call fcn.004146e0
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 1
je 0x4089e1
push str.ERROR:_Device_needs_to_be_in_DFU_mode_for_this_option._n
jmp 0x40ac6f
push 0x43ae4c
call fcn.00404cb0
add esp, 4
mov ecx, ebx
call fcn.004056d0
test eax, eax
js 0x40ac77
push str.exploiting_with_limera1n..._n
call fcn.00404cb0
mov edx, dword [ebx + 0x38]
add esp, 4
mov ecx, dword [ebx + 0x44]
call fcn.00411150
test eax, eax
je 0x408a41
push 0x43ae80
call fcn.00404d10
add esp, 4
mov ecx, ebx
call fcn.004057a0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.004057a0
push str.Device_should_be_in_pwned_DFU_state_now._n
call fcn.00404cb0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
test edx, 0x100
je 0x408fdd
mov ecx, dword [ebx + 0x44]
lea edx, [ebp - 0xe34]
mov dword [ebp - 0xe4c], 0
mov dword [ebp - 0xe34], 0
mov ecx, dword [ecx]
call fcn.0040ff50
mov esi, eax
test esi, esi
jns 0x408abe
push str.ERROR:_Could_not_fetch_list_of_signed_firmwares._n
call fcn.00404d10
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0xe34]
push edi
call sym.fixios.exe_plist_array_get_size
mov esi, eax
add esp, 4
mov dword [ebp - 0xe38], esi
test esi, esi
jne 0x408b0a
test edi, edi
je 0x408ae4
mov ecx, edi
call fcn.00427a00
mov eax, dword [ebx + 0x44]
push dword [eax]
push str.ERROR:_No_firmwares_are_currently_being_signed_for__s__REALLY____n
call fcn.00404d10
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
test dword [ebx], 0x200
je 0x408cc1
mov eax, dword [ebx + 0x44]
push dword [eax]
push str.The_following_firmwares_are_currently_being_signed_for__s:_n
call fcn.00404cb0
add esp, 8
test esi, esi
je 0x408bc9
xor ebx, ebx
push ebx
push edi
call sym.fixios.exe_plist_array_get_item
mov esi, eax
push 0x43af80
push esi
call sym.fixios.exe_plist_dict_get_item
push 0x43af88
push esi
mov edi, eax
call sym.fixios.exe_plist_dict_get_item
mov esi, eax
mov dword [ebp - 0xe44], 0
lea eax, [ebp - 0xe44]
mov dword [ebp - 0xe40], 0
push eax
push edi
call sym.fixios.exe_plist_get_string_val
lea eax, [ebp - 0xe40]
push eax
push esi
call sym.fixios.exe_plist_get_string_val
mov edi, dword [ebp - 0xe40]
inc ebx
mov esi, dword [ebp - 0xe44]
push edi
push esi
push ebx
push str.____d___s__build__s__n
call fcn.00404cb0
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 0x3c
push edi
call esi
mov esi, dword [ebp - 0xe38]
add esp, 4
mov edi, dword [ebp - 0xe34]
cmp ebx, esi
jb 0x408b32
mov ebx, dword [ebp - 0xe50]
push str.Select_the_firmware_you_want_to_restore:
call fcn.004010c0
add esp, 4
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
lea ecx, [ebp - 0x48]
call fcn.00405220
add esp, 4
cmp byte [ebp - 0x48], 0
je 0x408cec
test byte [ebx], 1
jne 0x40ac77
push 0xa
lea eax, [ebp - 0x48]
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
add esp, 0xc
test eax, eax
je 0x408c34
cmp eax, esi
jbe 0x408c86
push esi
push str.Invalid_input_value._Must_be_in_range:_1.._d_n
call fcn.004010c0
push str.Select_the_firmware_you_want_to_restore:
call fcn.004010c0
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
lea ecx, [ebp - 0x48]
call fcn.00405220
add esp, 4
cmp byte [ebp - 0x48], 0
jne 0x408c12
jmp 0x408cec
xor esi, esi
test edi, edi
je 0x408cdb
mov ecx, dword [edi + 0x14]
test ecx, ecx
je 0x408cdb
cmp dword [ecx + 0x10], 4
jne 0x408cdb
mov esi, dword [edi + 0x20]
test esi, esi
je 0x408cbd
mov esi, dword [esi]
test esi, esi
je 0x408cbd
xor ecx, ecx
lea edx, [eax - 1]
nop dword [eax + eax]
mov eax, ecx
inc ecx
cmp eax, edx
je 0x408cdb
mov esi, dword [esi]
test esi, esi
jne 0x408cb0
xor esi, esi
jmp 0x408cdb
push str.NOTE:_Running_non_interactively__automatically_selecting_latest_available_version_n
call fcn.00404cb0
add esp, 4
push 0
push edi
call sym.fixios.exe_plist_array_get_item
add esp, 8
mov esi, eax
test esi, esi
jne 0x408d0f
push str.ERROR:_failed_to_select_latest_firmware___n
call fcn.00404d10
add esp, 4
test edi, edi
je 0x40ac77
mov ecx, edi
call fcn.00427a00
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.version
push esi
call sym.fixios.exe_plist_dict_get_item
push str.buildid
push esi
mov dword [ebp - 0xe40], eax
call sym.fixios.exe_plist_dict_get_item
mov ecx, dword [ebp - 0xe40]
add esp, 0x10
mov dword [ebp - 0xe38], eax
mov dword [ebp - 0xe44], 0
mov dword [ebp - 0xe34], 0
test ecx, ecx
je 0x408d5e
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x408d5e
mov eax, dword [eax + 0x10]
jmp 0x408d63
mov eax, 0xa
mov dword [ebp - 0xe40], eax
xorps xmm0, xmm0
movlpd qword [ebp - 0xdd0], xmm0
cmp eax, 3
jne 0x408d95
lea eax, [ebp - 0xdd0]
push eax
lea eax, [ebp - 0xe44]
push eax
lea edx, [ebp - 0xe40]
call fcn.00428610
add esp, 8
mov ecx, dword [ebp - 0xe38]
test ecx, ecx
je 0x408dab
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x408dab
mov eax, dword [eax + 0x10]
jmp 0x408db0
mov eax, 0xa
mov dword [ebp - 0xe40], eax
xorps xmm0, xmm0
movlpd qword [ebp - 0xdd0], xmm0
cmp eax, 3
jne 0x408de2
lea eax, [ebp - 0xdd0]
push eax
lea eax, [ebp - 0xe34]
push eax
lea edx, [ebp - 0xe40]
call fcn.00428610
add esp, 8
push dword [ebp - 0xe34]
push dword [ebp - 0xe44]
push str.Selected_firmware__s__build__s__n
call fcn.00404cb0
add esp, 0xc
push dword [ebp - 0xe44]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [ebp - 0xe34]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push 0x43b0b8
push esi
call sym.fixios.exe_plist_dict_get_item
push str.sha1sum
push esi
mov dword [ebp - 0xe40], eax
call sym.fixios.exe_plist_dict_get_item
mov ecx, dword [ebp - 0xe40]
xor esi, esi
add esp, 0x10
mov dword [ebp - 0xe34], eax
mov dword [ebp - 0xe44], esi
test ecx, ecx
je 0x408e5c
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x408e5c
mov eax, dword [eax + 0x10]
jmp 0x408e61
mov eax, 0xa
mov dword [ebp - 0xe40], eax
xorps xmm0, xmm0
movlpd qword [ebp - 0xdd0], xmm0
cmp eax, 3
jne 0x408e93
lea eax, [ebp - 0xdd0]
push eax
lea eax, [ebp - 0xe4c]
push eax
lea edx, [ebp - 0xe40]
call fcn.00428610
add esp, 8
mov ecx, dword [ebp - 0xe34]
test ecx, ecx
je 0x408ea9
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x408ea9
mov eax, dword [eax + 0x10]
jmp 0x408eae
mov eax, 0xa
mov dword [ebp - 0xe40], eax
xorps xmm0, xmm0
movlpd qword [ebp - 0xdd0], xmm0
cmp eax, 3
jne 0x408ee6
lea eax, [ebp - 0xdd0]
push eax
lea eax, [ebp - 0xe44]
push eax
lea edx, [ebp - 0xe40]
call fcn.00428610
mov esi, dword [ebp - 0xe44]
add esp, 8
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408ef0
sub ecx, edx
cmp ecx, 0x28
jne 0x408f59
mov ebx, dword [ebp - 0xe44]
xor esi, esi
nop word [eax + eax]
lea eax, [ebp - 0xe40]
mov dword [ebp - 0xe40], 0
push eax
lea eax, [esi + ebx]
push 0x43b0c4
push eax
call fcn.00401230
mov al, byte [ebp - 0xe40]
mov ecx, esi
shr ecx, 1
add esi, 2
add esp, 0xc
mov byte [ebp + ecx - 0xddc], al
cmp esi, 0x28
jl 0x408f10
mov ebx, dword [ebp - 0xe50]
lea esi, [ebp - 0xddc]
jmp 0x408f68
push str.ERROR:_unexpected_size_of_sha1sum_n
call fcn.00404d10
add esp, 4
xor esi, esi
test edi, edi
je 0x408f73
mov ecx, edi
call fcn.00427a00
mov ecx, dword [ebp - 0xe4c]
test ecx, ecx
je 0x409054
test esi, esi
je 0x409054
lea eax, [ebp - 0xe44]
mov dword [ebp - 0xe44], 0
push eax
push dword [ebx + 0x60]
mov edx, esi
call fcn.00410290
mov esi, eax
add esp, 8
test esi, esi
je 0x408fd4
mov ecx, dword [ebp - 0xe44]
test ecx, ecx
je 0x408fc1
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xe44]
mov dword [ebx + 0x30], eax
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x408ffe
push dword [ebx + 0x68]
movsd xmm0, qword [0x432d08]
sub esp, 8
movsd qword [esp], xmm0
push 0
call eax
add esp, 0x10
test byte [ebx], 0x40
jne 0x408a55
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 3
jne 0x4090bc
cmp dword [ebx + 0x3c], 0
jne 0x40905e
mov ecx, ebx
call fcn.00415d70
test eax, eax
jns 0x40905e
push 0x44158c
call fcn.00404d10
add esp, 4
push str.ERROR:_Unable_to_exit_restore_mode_n
call fcn.00404d10
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.ERROR:_Missing_firmware_URL_or_SHA1_n
jmp 0x40ac6f
push str.Rebooting_restore_mode_device..._n
call fcn.00404cb0
mov eax, dword [ebx + 0x3c]
add esp, 4
push dword [eax + 0x20]
call dword [sym.imp.imobiledevice.dll_restored_reboot]
mov eax, dword [ebx + 0x3c]
add esp, 4
push dword [eax + 0x20]
call dword [sym.imp.imobiledevice.dll_restored_client_free]
add esp, 4
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, ebx
call fcn.0040af00
test eax, eax
jns 0x4090a9
push str.ERROR:_Unable_to_discover_device_mode._Please_make_sure_a_device_is_attached._n
jmp 0x40ac6f
mov eax, dword [ebx + 0x4c]
push dword [eax + 4]
push str.Found_device_in__s_mode_n
call fcn.00404cb0
add esp, 8
push 0
push dword [ebx + 0x30]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__access]
add esp, 8
test eax, eax
jns 0x4090f2
push dword [ebx + 0x30]
push str.ERROR:_Firmware_file__s_does_not_exist._n
call fcn.00404d10
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
test byte [ebx], 8
mov dword [ebp - 0xe4c], 0
je 0x409144
push str.Extracting_Restore.plist_from_IPSW_n
call fcn.00404cb0
mov ecx, dword [ebx + 0x30]
lea edx, [ebp - 0xe4c]
add esp, 4
call fcn.0040fe80
test eax, eax
jns 0x40919d
push dword [ebx + 0x30]
push str.ERROR:_Unable_to_extract_Restore.plist_from__s._Firmware_file_might_be_corrupt._n
call fcn.00404d10
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.Extracting_BuildManifest_from_IPSW_n
call fcn.00404cb0
mov ecx, dword [ebx + 0x30]
lea eax, [ebp - 0xe48]
add esp, 4
lea edx, [ebp - 0xe4c]
push eax
call fcn.0040fda0
add esp, 4
test eax, eax
jns 0x409191
push dword [ebx + 0x30]
push str.ERROR:_Unable_to_extract_BuildManifest_from__s._Firmware_file_might_be_corrupt._n
call fcn.00404d10
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xe48]
mov dword [ebp - 0xe58], eax
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x4091be
push dword [ebx + 0x68]
movsd xmm0, qword [0x432d18]
sub esp, 8
movsd qword [esp], xmm0
push 0
call eax
add esp, 0x10
mov edx, dword [ebx + 0x44]
mov esi, dword [ebp - 0xe4c]
mov ecx, esi
mov edx, dword [edx]
call fcn.0040c370
test eax, eax
jns 0x4091de
push str.ERROR:_Could_not_make_sure_this_firmware_is_suitable_for_the_current_device._Refusing_to_continue._n
jmp 0x40ac6f
mov edx, ebx
mov ecx, esi
call fcn.0040c500
push dword [ebx + 0x50]
push str.Product_Version:__s_n
call fcn.00404cb0
push dword [ebx + 0x58]
push dword [ebx + 0x54]
push str.Product_Build:__s_Major:__d_n
call fcn.00404cb0
add esp, 0x14
mov ecx, ebx
call fcn.0040aff0
test eax, eax
mov dword [ebx + 0x20], eax
mov edx, 0x43b2c4
mov ecx, 0x43b384
cmove ecx, edx
push ecx
push str.Device_supports_Image4:__s_n
call fcn.00404cb0
add esp, 8
test byte [ebx], 8
je 0x409248
xor eax, eax
push str.Custom_firmware_requested._Disabled_TSS_request._n
mov dword [ebp - 0xe58], eax
call fcn.00404cb0
add esp, 4
lea eax, [ebx + 4]
mov dword [eax], 0
mov dword [ebp - 0xe44], eax
mov eax, dword [ebx]
test al, 8
je 0x409939
push 1
push 0x18
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov edx, eax
mov dword [eax + 0x10], 5
call fcn.0042c770
mov ecx, dword [ebx + 0x44]
lea esi, [ebp - 0xdd0]
mov dword [ebp - 0xe48], eax
mov edx, dword [ecx + 4]
nop
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [esi], cl
lea esi, [esi + 1]
test cl, cl
jne 0x409290
cmp byte [ebp - 0xdd0], cl
je 0x4092c5
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_tolower]
lea esi, [ebp - 0xdd0]
movsx eax, byte [esi]
push eax
call edi
mov byte [esi], al
lea esi, [esi + 1]
add esp, 4
cmp byte [esi], 0
jne 0x4092b2
push 0x43b3c0
lea eax, [ebp - 0xdd0]
push eax
lea eax, [ebp - 0x1c8]
push str.Firmware_all_flash_all_flash._s._s
push eax
call fcn.00403e30
add esp, 0x10
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x1c8]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x149], al
test al, al
jne 0x4092f0
mov edx, str._manifest
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x409310
lea edi, [ebp - 0x148]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409320
mov ecx, edx
mov dword [ebp - 0xe40], 0
shr ecx, 2
lea eax, [ebp - 0xe34]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [ebp - 0xe34], 0
and ecx, 3
lea edx, [ebp - 0x148]
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x30]
lea eax, [ebp - 0xe40]
push eax
call fcn.0040fa80
add esp, 8
test eax, eax
jns 0x409395
lea eax, [ebp - 0x148]
push eax
push str.ERROR:_could_not_extract__s_from_IPSW_n
call fcn.00404d10
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0xe40]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strtok]
push 0x43b424
push edi
call esi
add esp, 8
mov dword [ebp - 0xe40], 0
test eax, eax
je 0x4093f0
xor ebx, ebx
nop dword [eax]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov dword [ebp + ebx*4 - 0x48], eax
add esp, 4
inc ebx
cmp ebx, 0x10
jge 0x4093e4
push 0x43b428
push 0
call esi
add esp, 8
test eax, eax
jne 0x4093c0
mov dword [ebp - 0xe40], ebx
mov ebx, dword [ebp - 0xe50]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
call sym.fixios.exe_plist_new_dict
cmp dword [ebp - 0xe40], 0
mov dword [ebp - 0xe38], eax
mov dword [ebp - 0xe34], 0
jle 0x409581
mov ebx, dword [ebp - 0xe40]
call sym.fixios.exe_plist_new_dict
mov dword [ebp - 0xe40], eax
xor edx, edx
nop
mov cl, byte [ebp + edx - 0x1c8]
lea edx, [edx + 1]
mov byte [ebp + edx - 0x149], cl
test cl, cl
jne 0x409430
mov edx, 0x43b42c
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x409450
lea edi, [ebp - 0x148]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409460
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0xe34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp + edx*4 - 0x48]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x409482
lea edi, [ebp - 0x148]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409492
mov ecx, edx
lea eax, [ebp - 0x148]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call sym.fixios.exe_plist_new_string
mov edi, dword [ebp - 0xe40]
add esp, 4
push eax
push 0x43b430
push edi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
call sym.fixios.exe_plist_new_dict
push edi
mov esi, eax
push 0x43b438
push esi
call sym.fixios.exe_plist_dict_set_item
mov eax, dword [ebp - 0xe34]
add esp, 0xc
mov edi, dword [ebp + eax*4 - 0x48]
mov ecx, edi
call fcn.0040ca20
test eax, eax
je 0x40953b
push esi
push eax
push dword [ebp - 0xe38]
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
push 0xa
push 0x43b440
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x409554
push esi
call sym.fixios.exe_plist_copy
add esp, 4
push eax
push 0x43b44c
push dword [ebp - 0xe38]
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
jmp 0x409554
push edi
push str.WARNING:_unhandled_component__s_n
call fcn.00404d10
add esp, 8
test esi, esi
je 0x409554
mov ecx, esi
call fcn.00427a00
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [ebp - 0xe34]
add esp, 4
mov dword [ebp + esi*4 - 0x48], 0
inc esi
mov dword [ebp - 0xe34], esi
cmp esi, ebx
jl 0x409422
mov ebx, dword [ebp - 0xe50]
push 0x43b484
lea eax, [ebp - 0xdd0]
push eax
lea eax, [ebp - 0x148]
push str.Firmware_dfu_iBSS._s._s.dfu
push eax
call fcn.00403e30
call sym.fixios.exe_plist_new_dict
mov edi, eax
lea eax, [ebp - 0x148]
push eax
call sym.fixios.exe_plist_new_string
add esp, 0x14
push eax
push 0x43b4a8
push edi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
call sym.fixios.exe_plist_new_dict
push edi
mov esi, eax
push 0x43b4b0
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
push esi
push 0x43b4b8
push dword [ebp - 0xe38]
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
lea eax, [ebp - 0xdd0]
push 0x43b4c0
push eax
lea eax, [ebp - 0x148]
push str.Firmware_dfu_iBEC._s._s.dfu
push eax
call fcn.00403e30
call sym.fixios.exe_plist_new_dict
mov edi, eax
lea eax, [ebp - 0x148]
push eax
call sym.fixios.exe_plist_new_string
add esp, 0x14
push eax
push 0x43b4e4
push edi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
call sym.fixios.exe_plist_new_dict
push edi
mov esi, eax
push 0x43b4ec
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
push esi
push 0x43b4f4
push dword [ebp - 0xe38]
call sym.fixios.exe_plist_dict_set_item
mov edi, dword [ebp - 0xe4c]
add esp, 0xc
push str.KernelCachesByTarget
push edi
call sym.fixios.exe_plist_dict_get_item
mov esi, eax
add esp, 8
test esi, esi
je 0x4096ab
push esi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 5
jne 0x4096ab
push 3
lea eax, [ebp - 0xdd0]
push eax
lea eax, [ebp - 0xe40]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov byte [ebp - 0xe3d], 0
lea eax, [ebp - 0xe40]
push eax
push esi
jmp 0x4096b1
push str.RestoreKernelCaches
push edi
call sym.fixios.exe_plist_dict_get_item
mov esi, eax
add esp, 8
test esi, esi
je 0x409759
push esi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 5
jne 0x409759
push 0x43b528
push esi
call sym.fixios.exe_plist_dict_get_item
mov edi, eax
add esp, 8
test edi, edi
je 0x409759
push edi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 3
jne 0x409759
call sym.fixios.exe_plist_new_dict
push edi
mov esi, eax
call sym.fixios.exe_plist_copy
add esp, 4
push eax
push 0x43b530
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
call sym.fixios.exe_plist_new_dict
push esi
mov edi, eax
push 0x43b538
push edi
call sym.fixios.exe_plist_dict_set_item
mov esi, dword [ebp - 0xe38]
add esp, 0xc
push edi
push 0x43b540
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
push edi
call sym.fixios.exe_plist_copy
add esp, 4
push eax
push 0x43b54c
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
push str.RestoreRamDisks
push dword [ebp - 0xe4c]
call sym.fixios.exe_plist_dict_get_item
mov edi, eax
add esp, 8
test edi, edi
je 0x40981e
push edi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 5
jne 0x40981e
test byte [ebx], 4
mov ecx, 0x43b578
mov eax, 0x43b570
cmove eax, ecx
push eax
push edi
call sym.fixios.exe_plist_dict_get_item
mov esi, eax
add esp, 8
test esi, esi
jne 0x4097c4
test byte [ebx], 4
jne 0x40981e
push 0x43b580
push edi
call sym.fixios.exe_plist_dict_get_item
or dword [ebx], 4
mov esi, eax
add esp, 8
test esi, esi
je 0x40981e
push esi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 3
jne 0x40981e
call sym.fixios.exe_plist_new_dict
push esi
mov edi, eax
call sym.fixios.exe_plist_copy
add esp, 4
push eax
push 0x43b588
push edi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
call sym.fixios.exe_plist_new_dict
push edi
mov esi, eax
push 0x43b590
push esi
call sym.fixios.exe_plist_dict_set_item
mov edi, dword [ebp - 0xe38]
add esp, 0xc
push esi
push 0x43b598
push edi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
jmp 0x409824
mov edi, dword [ebp - 0xe38]
push str.SystemRestoreImages
push dword [ebp - 0xe4c]
call sym.fixios.exe_plist_dict_get_item
mov esi, eax
add esp, 8
test esi, esi
jne 0x40984a
push str.ERROR:_missing_SystemRestoreImages_in_Restore.plist_n
call fcn.00404d10
add esp, 4
push 0x43b5f4
push esi
call sym.fixios.exe_plist_dict_get_item
mov esi, eax
add esp, 8
test esi, esi
jne 0x40986d
push str.ERROR:_missing_filesystem_in_Restore.plist_n
call fcn.00404d10
add esp, 4
jmp 0x4098b7
call sym.fixios.exe_plist_new_dict
push esi
mov edi, eax
call sym.fixios.exe_plist_copy
add esp, 4
push eax
push 0x43b628
push edi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
call sym.fixios.exe_plist_new_dict
push edi
mov esi, eax
push 0x43b630
push esi
call sym.fixios.exe_plist_dict_set_item
mov edi, dword [ebp - 0xe38]
add esp, 0xc
push esi
push 0x43b638
push edi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
call sym.fixios.exe_plist_new_dict
test byte [ebx], 4
mov esi, eax
mov eax, 0x43b644
mov ecx, 0x43b63c
cmove ecx, eax
push ecx
call sym.fixios.exe_plist_new_string
add esp, 4
push eax
push 0x43b64c
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
mov ecx, str.Customer_Upgrade_Install__IPSW_
test byte [ebx], 4
mov eax, str.Customer_Erase_Install__IPSW_
cmove eax, ecx
push eax
call sym.fixios.exe_plist_new_string
add esp, 4
push eax
push 0x43b69c
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
push esi
mov esi, dword [ebp - 0xe48]
push 0x43b6a4
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
push edi
push 0x43b6ac
push esi
call sym.fixios.exe_plist_dict_set_item
add esp, 0xc
mov eax, esi
jmp 0x4099bb
mov edx, dword [ebx + 0x44]
mov ecx, esi
mov edx, dword [edx + 4]
test al, 4
je 0x40998c
push 0x43b6b8
call fcn.0040b390
add esp, 4
mov dword [ebp - 0xe48], eax
test eax, eax
jne 0x4099bb
push str.ERROR:_Unable_to_find_any_build_identities_n
call fcn.00404d10
add esp, 4
test esi, esi
je 0x40ac77
mov ecx, esi
call fcn.00427a00
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push 0x43b6ec
call fcn.0040b390
add esp, 4
mov dword [ebp - 0xe48], eax
test eax, eax
jne 0x4099bb
mov eax, dword [ebx + 0x44]
mov ecx, esi
push 0
mov edx, dword [eax + 4]
call fcn.0040b390
add esp, 4
mov dword [ebp - 0xe48], eax
mov ecx, eax
call fcn.0040c5f0
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 4
jne 0x409b9a
test byte [ebx], 0x84
jne 0x409b9a
push 0x43b6f4
mov ecx, ebx
call fcn.00413d40
mov esi, eax
xor edi, edi
add esp, 4
mov dword [ebp - 0xe50], edi
test esi, esi
je 0x409b90
mov eax, dword [esi + 0x14]
test eax, eax
je 0x409a04
mov eax, dword [eax + 0x10]
jmp 0x409a09
mov eax, 0xa
mov dword [ebp - 0xe40], eax
xorps xmm0, xmm0
movlpd qword [ebp - 0xdd0], xmm0
cmp eax, 3
jne 0x409a43
lea eax, [ebp - 0xdd0]
mov ecx, esi
push eax
lea eax, [ebp - 0xe50]
push eax
lea edx, [ebp - 0xe40]
call fcn.00428610
mov edi, dword [ebp - 0xe50]
add esp, 8
mov ecx, esi
call fcn.00427a00
test edi, edi
je 0x409b90
mov edx, dword [ebx + 0x50]
mov ecx, edi
call fcn.00408490
test eax, eax
jle 0x409b90
test dword [ebx], 0x200
je 0x409b90
mov edi, dword [ebx + 0x50]
mov edx, edi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x409a78
sub edx, ecx
mov ecx, dword [ebp - 0xe50]
lea esi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409a90
sub ecx, esi
lea eax, [ebp - 0xdd8]
mov esi, 0xd
sub esi, ecx
sub esi, edx
push esi
push 0x20
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp esi, 0x10
jae 0x40ac8b
lea eax, [ebp - 0xdd8]
mov byte [ebp + esi - 0xdd8], 0
push eax
push edi
mov edi, dword [ebp - 0xe50]
push edi
push str.___WARNING____n_You_are_trying_to_DOWNGRADE_a__s_device_with_an_IPSW_for__s_while_s__n_trying_to_preserve_the_user_data__Upgrade_restore_._This_might_work__but__n_there_is_a_VERY_HIGH_chance_it_might_FAIL_BADLY_with_COMPLETE_DATA_LOSS.____n_Hit_CTRLC_now_if_you_want_to_abort_the_restore.____________________________n_If_you_want_to_take_the_risk__and_have_a_backup_of_your_important_data______n_type_YES_and_press_ENTER_to_continue._You_have_been_warned._________________n_n
call fcn.004010c0
push 0x43b704
call fcn.004010c0
add esp, 0x14
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push eax
call esi
add esp, 4
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call esi
add esp, 4
mov byte [ebp - 0x48], 0
push ecx
lea ecx, [ebp - 0x48]
call fcn.00405220
add esp, 4
test byte [ebx], 1
jne 0x40ac77
cmp byte [ebp - 0x48], 0
je 0x409b69
mov ecx, 0x43b97c
lea eax, [ebp - 0x48]
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409b60
test dl, dl
je 0x409b5c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409b60
add eax, 2
add ecx, 2
test dl, dl
jne 0x409b40
xor eax, eax
jmp 0x409b65
sbb eax, eax
or eax, 1
test eax, eax
je 0x409b90
push 0x43b980
call fcn.004010c0
add esp, 4
push 0x43b704
call fcn.004010c0
add esp, 4
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x409af9
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebx]
and eax, 0x204
cmp eax, 0x204
jne 0x409c5f
push str.___WARNING____n_You_are_about_to_perform_an_ERASE_restore._ALL_DATA_on_the_target_device__n_will_be_IRREVERSIBLY_DESTROYED._If_you_want_to_update_your_device_without___n_erasing_the_user_data__hit_CTRLC_now_and_restart_without__e_or___erase_____n_command_line_switch.________________________________________________________n_If_you_want_to_continue_with_the_ERASE__please_type_YES_and_press_ENTER.____n_n
call fcn.004010c0
add esp, 4
push 0x43bbe4
call fcn.004010c0
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push 1
call edi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push eax
call esi
add esp, 4
push 0
call edi
add esp, 4
push eax
call esi
add esp, 4
mov byte [ebp - 0x48], 0
push ecx
lea ecx, [ebp - 0x48]
call fcn.00405220
add esp, 4
test byte [ebx], 1
jne 0x40ac77
cmp byte [ebp - 0x48], 0
je 0x409c3c
mov ecx, 0x43bbe8
lea eax, [ebp - 0x48]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x409c33
test dl, dl
je 0x409c2f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x409c33
add eax, 2
add ecx, 2
test dl, dl
jne 0x409c13
xor eax, eax
jmp 0x409c38
sbb eax, eax
or eax, 1
test eax, eax
je 0x409c5f
push str.Invalid_input._Please_type_YES_or_hit_CTRLC_to_abort._n
call fcn.004010c0
add esp, 4
push 0x43bbe4
call fcn.004010c0
add esp, 4
push 1
call edi
jmp 0x409bd6
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x409c7b
push dword [ebx + 0x68]
xorps xmm0, xmm0
sub esp, 8
movsd qword [esp], xmm0
push 1
call eax
add esp, 0x10
push str.Checking_IPSW_for_required_components..._n
call fcn.00404cb0
mov esi, dword [ebp - 0xe48]
add esp, 4
mov edx, dword [ebx + 0x30]
mov ecx, esi
call fcn.0040c780
test eax, eax
jns 0x409cc0
push dword [ebx + 0x30]
push str.ERROR:_Could_not_find_all_required_components_in_IPSW__s_n
call fcn.00404d10
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.All_required_components_found_in_IPSW_n
call fcn.00404cb0
add esp, 4
mov dword [ebp - 0xe34], 0
lea eax, [ebp - 0xe34]
mov edx, 0x43bcb4
mov ecx, esi
push eax
call fcn.0040c900
add esp, 4
test eax, eax
jns 0x409cfb
push str.ERROR:_Unable_get_path_for_filesystem_component_n
jmp 0x40ac6f
xor eax, eax
mov dword [ebp - 0xe38], 0
push 0x30
push eax
mov dword [ebp - 0xe40], eax
lea eax, [ebp - 0xe30]
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebx + 0x60]
add esp, 0xc
test eax, eax
je 0x409d8f
lea ecx, [ebp - 0xe30]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
jns 0x409d48
mov ecx, dword [ebx + 0x60]
mov edx, 0x1ed
call fcn.004050f0
mov ecx, dword [ebx + 0x60]
lea edx, [ebp - 0x9c8]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x409d53
mov edx, 0x43bcec
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x409d67
lea edi, [ebp - 0x9c8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409d77
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x409dad
mov ecx, dword [ebx + 0x30]
lea edx, [ebp - 0x9c8]
sub edx, ecx
nop word [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x409da0
mov ecx, dword [ebx + 0x30]
call fcn.0040f170
test eax, eax
jne 0x409e06
lea ecx, [ebp - 0x9c8]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409dc2
sub ecx, edx
cmp byte [ebp + ecx - 0x9c9], 0
lea edx, [ebp + ecx - 0x9c9]
mov eax, edx
je 0x409df7
nop
mov cl, byte [eax]
cmp cl, 0x2e
je 0x409df7
cmp cl, 0x2f
je 0x409df7
cmp cl, 0x5c
je 0x409df7
dec eax
cmp byte [eax], 0
jne 0x409de0
sub edx, eax
cmp edx, 6
jge 0x409e06
cmp byte [eax], 0x2e
jne 0x409e06
mov byte [eax], 0
lea eax, [ebp - 0xe30]
push eax
lea eax, [ebp - 0x9c8]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64]
add esp, 8
test eax, eax
jns 0x409e30
lea eax, [ebp - 0x9c8]
push eax
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__mkdir
add esp, 4
mov edx, 0x43bcf0
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x409e37
lea edi, [ebp - 0x9c8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409e47
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0xe34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x409e65
lea edi, [ebp - 0x9c8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409e75
mov ecx, edx
lea eax, [ebp - 0xe30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x30
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0xe30]
push eax
lea eax, [ebp - 0x9c8]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64]
add esp, 8
test eax, eax
jne 0x409f2f
mov edx, dword [ebp - 0xe34]
lea eax, [ebp - 0xdd0]
mov ecx, dword [ebx + 0x30]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0xdd0], xmm0
call fcn.0040f1e0
mov ecx, dword [ebp - 0xdcc]
add esp, 4
mov eax, dword [ebp - 0xdd0]
test ecx, ecx
jne 0x409ef0
test eax, eax
je 0x409f2f
cmp dword [ebp - 0xe18], eax
jne 0x409f2f
cmp dword [ebp - 0xe14], ecx
jne 0x409f2f
lea eax, [ebp - 0x9c8]
push eax
push str.Using_cached_filesystem_from__s_n
call fcn.00404cb0
lea eax, [ebp - 0x9c8]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 0xc
mov dword [ebp - 0xe40], eax
test eax, eax
jne 0x40a156
test byte [ebx], 0x80
jne 0x40a156
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x9c8]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x5c9], al
test al, al
jne 0x409f40
mov edx, 0x43bd18
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x409f60
lea edi, [ebp - 0x5c8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409f70
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ebp + ecx - 0x9c8]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0xdc9], al
test al, al
jne 0x409f90
mov edx, str..lock
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x409fb0
lea edi, [ebp - 0xdc8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x409fc0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0xde0]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0xdc8]
call fcn.00411510
xor edi, edi
lea eax, [ebp - 0x5c8]
push edi
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__access]
add esp, 8
test eax, eax
je 0x40a015
lea eax, [ebp - 0x5c8]
push 0x43bd2c
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov edi, eax
lea ecx, [ebp - 0xde0]
call fcn.004115b0
test edi, edi
jne 0x40a05d
mov ecx, str.ipsw_
call fcn.004128b0
mov esi, eax
test esi, esi
jne 0x40a051
mov esi, dword [ebp - 0xe34]
push esi
push str.WARNING:_Could_not_get_temporary_filename__using__s_in_current_directory_n
call fcn.00404d10
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 0xc
mov esi, eax
mov dword [ebp - 0xe38], 1
jmp 0x40a079
lea eax, [ebp - 0x5c8]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 4
mov esi, eax
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov edi, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
lea eax, [ebp - 0xdc8]
push eax
call edi
add esp, 4
push dword [ebp - 0xe34]
push str.Extracting_filesystem_from_IPSW:__s_n
call fcn.00404cb0
mov edx, dword [ebp - 0xe34]
mov ecx, dword [ebx + 0x30]
push 1
push esi
call fcn.0040f330
add esp, 0x10
test eax, eax
jns 0x40a10b
push str.ERROR:_Unable_to_extract_filesystem_from_IPSW_n
call fcn.00404d10
mov eax, dword [ebp - 0xe44]
add esp, 4
mov ecx, dword [eax]
test ecx, ecx
je 0x40a0d1
call fcn.00427a00
mov eax, dword [ebp - 0xe4c]
test eax, eax
je 0x40a0e2
mov ecx, eax
call fcn.00427a00
push esi
push str.Removing__s_n
call fcn.00404cb0
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str..extract
push esi
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
je 0x40a15c
lea eax, [ebp - 0x9c8]
push eax
call edi
add esp, 4
lea eax, [ebp - 0x9c8]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
lea eax, [ebp - 0x9c8]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 4
mov esi, eax
jmp 0x40a15c
mov esi, dword [ebp - 0xe40]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40a17d
push dword [ebx + 0x68]
movsd xmm0, qword [0x432ce8]
sub esp, 8
movsd qword [esp], xmm0
push 1
call eax
add esp, 0x10
mov ecx, dword [ebp - 0xe58]
test ecx, ecx
je 0x40a437
push str.Getting_devices_ECID_for_TSS_request_n
mov dword [ebp - 0xe40], 0
call fcn.00404da0
add esp, 4
lea edx, [ebx + 0x10]
mov ecx, ebx
call fcn.0040b090
test eax, eax
jns 0x40a1ba
push str.ERROR:_Unable_to_find_device_ECID_n
jmp 0x40ac6f
push dword [ebx + 0x14]
push dword [ebx + 0x10]
push str.Found_ECID__I64u_n
call fcn.00404cb0
mov eax, dword [ebx + 0x4c]
add esp, 0xc
cmp dword [eax], 4
jne 0x40a2b9
test byte [ebx], 0x84
jne 0x40a2b9
push str.HasSiDP
mov ecx, ebx
call fcn.00413d40
mov edi, eax
mov byte [ebp - 0xe51], 0
add esp, 4
test edi, edi
je 0x40a2b9
push edi
call sym.fixios.exe_plist_get_node_type
add esp, 4
test eax, eax
jne 0x40a2b9
lea eax, [ebp - 0xe51]
push eax
push edi
call sym.fixios.exe_plist_get_bool_val
add esp, 8
cmp byte [ebp - 0xe51], 0
je 0x40a2b9
push str.Checking_if_device_requires_stashbag..._n
call fcn.00404cb0
mov edx, dword [ebp - 0xe48]
lea eax, [ebp - 0xe40]
add esp, 4
mov ecx, ebx
push eax
call fcn.0040b570
add esp, 4
test eax, eax
jns 0x40a262
push str.ERROR:_Unable_to_create_preboard_manifest._n
jmp 0x40ac6f
push str.DEBUG:_creating_stashbag..._n
call fcn.00404da0
mov edi, dword [ebp - 0xe40]
add esp, 4
mov edx, edi
mov ecx, ebx
call fcn.00414020
test eax, eax
jns 0x40a29b
cmp eax, 0xfffffffe
jne 0x40a291
push str.ERROR:_Could_not_create_stashbag__timeout_._n
jmp 0x40ac6f
push str.ERROR:_An_error_occurred_while_creating_the_stashbag._n
jmp 0x40ac6f
xor ecx, ecx
cmp eax, 1
mov eax, 1
cmove ecx, eax
mov dword [ebp - 0xe40], ecx
test edi, edi
je 0x40a2b9
mov ecx, edi
call fcn.00427a00
cmp dword [ebx + 0x58], 8
jle 0x40a397
lea eax, [ebp - 0xe34]
mov dword [ebp - 0xe50], 0
push eax
lea edx, [ebp - 0xe50]
mov dword [ebp - 0xe34], 0
mov ecx, ebx
call fcn.0040b0f0
add esp, 4
test eax, eax
jns 0x40a2ff
push str.NOTE:_Unable_to_get_nonce_from_device_n
call fcn.00404cb0
add esp, 4
mov eax, dword [ebx + 0x18]
mov edi, dword [ebp - 0xe34]
test eax, eax
je 0x40a38b
cmp edi, dword [ebx + 0x1c]
jne 0x40a37d
mov ecx, dword [ebp - 0xe50]
mov edx, eax
sub edi, 4
jb 0x40a331
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40a336
add ecx, 4
add edx, 4
sub edi, 4
jae 0x40a320
cmp edi, 0xfffffffc
je 0x40a363
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40a374
cmp edi, 0xfffffffd
je 0x40a363
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40a374
cmp edi, 0xfffffffe
je 0x40a363
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x40a374
cmp edi, 0xffffffff
je 0x40a363
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x40a374
push dword [ebp - 0xe50]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x40a397
mov edi, dword [ebp - 0xe34]
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x40a38b
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp - 0xe50]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edi
test byte [ebx], 1
jne 0x40ac77
mov edi, dword [ebp - 0xe48]
lea eax, [ebx + 4]
push eax
mov edx, edi
mov ecx, ebx
call fcn.0040b810
add esp, 4
test eax, eax
jns 0x40a3c4
push 0x43bf68
jmp 0x40ac6f
cmp dword [ebp - 0xe40], 0
je 0x40a445
push 0x43bf9c
push dword [ebx + 4]
call sym.fixios.exe_plist_dict_get_item
mov edi, eax
add esp, 8
test edi, edi
je 0x40a42d
push edi
call sym.fixios.exe_plist_get_node_type
add esp, 4
cmp eax, 7
jne 0x40a42d
push str.Committing_stashbag..._n
call fcn.00404cb0
add esp, 4
mov edx, edi
mov ecx, ebx
call fcn.004143d0
test eax, eax
jns 0x40a43f
push eax
push str.ERROR:_Could_not_commit_stashbag___d_._Aborting._n
call fcn.00404d10
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.ERROR:_Missing_ApImg4Ticket_in_TSS_response_for_stashbag_commit_n
jmp 0x40ac6f
mov edi, dword [ebp - 0xe48]
jmp 0x40a44b
mov edi, dword [ebp - 0xe48]
mov ecx, dword [ebp - 0xe58]
mov eax, dword [ebx]
test al, 1
jne 0x40a7af
test al, al
jns 0x40a669
test ecx, ecx
jne 0x40a481
push str.This_device_does_not_require_a_TSS_record_n
call fcn.00404cb0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 4]
test eax, eax
jne 0x40a4be
push str.ERROR:_could_not_fetch_TSS_record_n
call fcn.00404d10
mov eax, dword [ebp - 0xe4c]
add esp, 4
test eax, eax
je 0x40ac77
mov ecx, eax
call fcn.00427a00
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0xe44]
mov dword [ebp - 0xe40], 0
push ecx
lea ecx, [ebp - 0xe40]
mov dword [ebp - 0xe44], 0
push ecx
push eax
call sym.fixios.exe_plist_to_bin
mov edi, dword [ebp - 0xe40]
add esp, 0xc
test edi, edi
je 0x40a628
mov ecx, dword [ebx + 0x60]
test ecx, ecx
je 0x40a54e
lea edx, [ebp - 0x5c8]
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x40a506
mov edx, str._shsh
mov esi, edx
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x40a520
lea edi, [ebp - 0x5c8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40a530
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0xe40]
jmp 0x40a564
mov eax, dword [str.shsh]
mov dword [ebp - 0x5c8], eax
mov al, byte [0x43c098]
mov byte [ebp - 0x5c4], al
mov edx, 0x1ed
lea ecx, [ebp - 0x5c8]
call fcn.004050f0
lea ecx, [ebp - 0x5c8]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a580
push dword [ebx + 0x50]
mov eax, dword [ebx + 0x44]
sub ecx, edx
push dword [eax]
lea eax, [ebp - 0x5c8]
push dword [ebx + 0x14]
add eax, ecx
push dword [ebx + 0x10]
push str.__I64u__s__s.shsh
push eax
call fcn.00403e30
lea eax, [ebp - 0xdf8]
push eax
lea eax, [ebp - 0x5c8]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 0x20
test eax, eax
lea eax, [ebp - 0x5c8]
je 0x40a611
push 0x43c0b0
push eax
call dword [sym.imp.zlib.dll_gzopen]
push dword [ebp - 0xe44]
mov esi, eax
push edi
push esi
call dword [sym.imp.zlib.dll_gzwrite]
add esp, 0x14
push esi
call dword [sym.imp.zlib.dll_gzclose]
add esp, 4
lea eax, [ebp - 0x5c8]
push eax
push str.SHSH_saved_to__s_n
call fcn.00404cb0
add esp, 8
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x40a632
push eax
push str.SHSH__s_already_present._n
call fcn.00404cb0
add esp, 8
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x40a632
push str.ERROR:_could_not_get_TSS_record_data_n
call fcn.00404d10
mov ecx, dword [ebx + 4]
add esp, 4
test ecx, ecx
je 0x40a641
call fcn.00427a00
mov eax, dword [ebp - 0xe4c]
test eax, eax
je 0x408a55
mov ecx, eax
call fcn.00427a00
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x40a683
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x40a67e
push str.ERROR:_Unable_to_proceed_without_a_TSS_record._n
jmp 0x40a48d
call fcn.0040c040
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40a6a4
push dword [ebx + 0x68]
movsd xmm0, qword [0x432cf0]
sub esp, 8
movsd qword [esp], xmm0
push 1
call eax
add esp, 0x10
test byte [ebx], 1
jne 0x40a7af
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 4
jne 0x40a712
push str.Entering_recovery_mode..._n
call fcn.00404cb0
add esp, 4
mov ecx, ebx
call fcn.00413bb0
test eax, eax
jns 0x40a712
push str.ERROR:_Unable_to_place_device_into_recovery_mode_from_normal_mode_n
call fcn.00404d10
mov eax, dword [ebp - 0xe44]
add esp, 4
mov ecx, dword [eax]
test ecx, ecx
je 0x40a6eb
call fcn.00427a00
mov eax, dword [ebp - 0xe4c]
test eax, eax
je 0x40a6fc
mov ecx, eax
call fcn.00427a00
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40a733
push dword [ebx + 0x68]
movsd xmm0, qword [0x432cf8]
sub esp, 8
movsd qword [esp], xmm0
push 1
call eax
add esp, 0x10
test byte [ebx], 1
jne 0x40a7af
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 1
jne 0x40a84d
mov ecx, ebx
call fcn.004057a0
mov ecx, ebx
call fcn.004146e0
test byte [ebx], 8
je 0x40a7e4
mov ecx, dword [ebx + 0x44]
call fcn.004110e0
test eax, eax
je 0x40a7e4
push str.connecting_to_DFU_n
call fcn.00404cb0
add esp, 4
mov ecx, ebx
call fcn.004056d0
test eax, eax
js 0x40a7af
push str.exploiting_with_limera1n_n
call fcn.00404cb0
mov edx, dword [ebx + 0x38]
add esp, 4
mov ecx, dword [ebx + 0x44]
call fcn.00411150
test eax, eax
je 0x40a7d0
push str.ERROR:_limera1n_exploit_failed_n
call fcn.00404d10
add esp, 4
mov ecx, ebx
call fcn.004057a0
cmp dword [ebp - 0xe38], 0
je 0x40ac77
test esi, esi
je 0x40ac77
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
jmp 0x40ac74
mov ecx, ebx
call fcn.004057a0
push str.exploited_n
call fcn.00404cb0
add esp, 4
mov edx, edi
mov ecx, ebx
call fcn.00405da0
test eax, eax
jns 0x40a84d
push str.ERROR:_Unable_to_place_device_into_recovery_mode_from_DFU_mode1_n
call fcn.00404d10
mov eax, dword [ebp - 0xe4c]
add esp, 4
test eax, eax
je 0x40a80f
mov ecx, eax
call fcn.00427a00
mov eax, dword [ebp - 0xe44]
mov ecx, dword [eax]
test ecx, ecx
je 0x40a820
call fcn.00427a00
cmp dword [ebp - 0xe38], 0
je 0x40a837
test esi, esi
je 0x40a837
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 1
jne 0x40a85e
mov dword [ebx + 0x4c], 0x439068
jmp 0x40a8ba
cmp dword [ebx + 0x58], 8
jle 0x40a889
test byte [ebx], 8
jne 0x40a889
cmp dword [ebx + 0x20], 0
jne 0x40a889
mov ecx, ebx
call fcn.00414b80
test eax, eax
jns 0x40a889
push 0x43c23c
call fcn.00404d10
add esp, 4
jmp 0x40a820
mov edx, edi
mov ecx, ebx
call fcn.00414e00
test eax, eax
jns 0x40a8a8
push str.ERROR:_Unable_to_send_iBEC_n
call fcn.00404d10
add esp, 4
jmp 0x40a820
mov ecx, ebx
call fcn.004146e0
push 0x1b58
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40a8db
push dword [ebx + 0x68]
movsd xmm0, qword [0x432d00]
sub esp, 8
movsd qword [esp], xmm0
push 1
call eax
add esp, 0x10
test byte [ebx], 1
jne 0x40a7af
cmp dword [ebx + 0x20], 0
jne 0x40a9ca
cmp dword [ebx + 0x58], 8
jle 0x40a9ca
lea eax, [ebp - 0xe34]
mov dword [ebp - 0xe50], 0
push eax
lea edx, [ebp - 0xe50]
mov dword [ebp - 0xe34], 0
mov ecx, ebx
call fcn.0040b0f0
add esp, 4
test eax, eax
jns 0x40a948
push str.ERROR:_Unable_to_get_nonce_from_device__n
call fcn.00404d10
mov ecx, dword [ebx + 0x40]
add esp, 4
mov edx, str.reset
mov ecx, dword [ecx]
call fcn.00402610
jmp 0x40a820
mov eax, dword [ebx + 0x18]
mov edi, dword [ebp - 0xe34]
test eax, eax
je 0x40aa39
cmp edi, dword [ebx + 0x1c]
jne 0x40aa2b
mov ecx, dword [ebp - 0xe50]
mov edx, eax
sub edi, 4
jb 0x40a981
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40a986
add ecx, 4
add edx, 4
sub edi, 4
jae 0x40a970
cmp edi, 0xfffffffc
je 0x40a9bb
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40aa22
cmp edi, 0xfffffffd
je 0x40a9bb
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40aa22
cmp edi, 0xfffffffe
je 0x40a9bb
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x40aa22
cmp edi, 0xffffffff
je 0x40a9bb
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x40aa22
push dword [ebp - 0xe50]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov edi, dword [ebp - 0xe48]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40a9f1
push dword [ebx + 0x68]
movsd xmm0, qword [0x432d10]
sub esp, 8
movsd qword [esp], xmm0
push 1
call eax
add esp, 0x10
test byte [ebx], 1
jne 0x40a7af
mov eax, dword [ebx + 0x4c]
cmp dword [eax], 2
jne 0x40aac3
cmp dword [ebx + 0x2c], 0
jne 0x40aaa5
push str.ERROR:_could_not_retrieve_device_serial_number._Cant_continue._n
call fcn.00404d10
add esp, 4
jmp 0x40a7af
mov edi, dword [ebp - 0xe34]
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x40aa39
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
test byte [ebx], 8
mov eax, dword [ebp - 0xe50]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edi
jne 0x40a9ca
mov ecx, dword [ebx + 4]
lea edi, [ebx + 4]
test ecx, ecx
je 0x40aa59
call fcn.00427a00
push edi
mov edi, dword [ebp - 0xe48]
mov ecx, ebx
mov edx, edi
call fcn.0040b810
add esp, 4
test eax, eax
jns 0x40aa82
push str.ERROR:_Unable_to_get_SHSH_blobs_for_this_device_n
call fcn.00404d10
add esp, 4
jmp 0x40a7af
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x40aa9b
push str.ERROR:_cant_continue_without_TSS_n
call fcn.00404d10
add esp, 4
jmp 0x40a7af
call fcn.0040c040
jmp 0x40a9d0
mov edx, edi
mov ecx, ebx
call fcn.004148f0
test eax, eax
jns 0x40aabc
push str.ERROR:_Unable_to_place_device_into_restore_mode_n
jmp 0x40a7f6
mov ecx, ebx
call fcn.004146e0
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x40aae4
push dword [ebx + 0x68]
movsd xmm0, qword [0x432d20]
sub esp, 8
movsd qword [esp], xmm0
push 1
call eax
add esp, 0x10
push str.Waiting_for_device_to_enter_restore_mode..._n
call fcn.00404cb0
mov eax, dword [ebx + 0x4c]
add esp, 4
cmp dword [eax], 3
jne 0x40ac6a
push str.About_to_restore_device...__n
mov dword [ebx + 0x90], 1
call fcn.00404cb0
add esp, 4
mov edx, edi
mov ecx, ebx
push esi
call fcn.0041ade0
mov edi, eax
add esp, 4
test edi, edi
jns 0x40ab5e
push str.ERROR:_Unable_to_restore_device_n
call fcn.00404d10
add esp, 4
cmp dword [ebp - 0xe38], 0
je 0x40ab4b
test esi, esi
je 0x40ab4b
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.Cleaning_up..._n
call fcn.00404cb0
add esp, 4
cmp dword [ebp - 0xe38], 0
je 0x40ab82
test esi, esi
je 0x40ab82
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__unlink]
add esp, 4
mov eax, dword [ebx + 0x44]
push 7
push str.AppleTV
push dword [eax]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40abe4
mov eax, dword [ebx + 0x44]
mov eax, dword [eax]
cmp byte [eax + 7], 0x35
jge 0x40abe4
mov ecx, ebx
call fcn.00414720
test eax, eax
jne 0x40abd7
lea edx, [eax + 1]
mov ecx, ebx
call fcn.00414890
test eax, eax
jne 0x40abd0
mov ecx, dword [ebx + 0x40]
mov edx, str.reset
mov ecx, dword [ecx]
call fcn.00402610
jmp 0x40abe4
push str.Setting_auto_boot_failed___n
jmp 0x40abdc
push str.Could_not_connect_to_device_in_recovery_mode._n
call fcn.00404d10
add esp, 4
push str.DONE_n
call fcn.00404cb0
mov eax, dword [ebx + 0x64]
add esp, 4
test edi, edi
jne 0x40ac13
test eax, eax
je 0x40ac31
push dword [ebx + 0x68]
movsd xmm0, qword [0x432d28]
sub esp, 8
movsd qword [esp], xmm0
push 0x64
jmp 0x40ac2c
test eax, eax
je 0x40ac31
push dword [ebx + 0x68]
movsd xmm0, qword [0x432d28]
sub esp, 8
movsd qword [esp], xmm0
push 0x65
call eax
add esp, 0x10
mov eax, dword [ebp - 0xe4c]
test eax, eax
je 0x40ac42
mov ecx, eax
call fcn.00427a00
mov eax, dword [ebp - 0xe48]
test eax, eax
je 0x40ab4b
mov ecx, eax
call fcn.00427a00
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push str.ERROR:_Device_failed_to_enter_restore_mode.._n
call fcn.00404d10
add esp, 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
call fcn.0042ec72
int3