Function at 0x402660
Capabilities:
Check for time delay via queryperformancecounter
Delete file
Move file
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2154
call fcn.00405cd0
mov eax, dword [0x40a004]
xor eax, esp
mov dword [esp + 0x2150], eax
mov eax, dword [ebp + 0xc]
xor ecx, ecx
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
xorps xmm0, xmm0
push edi
push 0x402530
or ebx, 0xffffffff
mov dword [esp + 0x18], eax
push 2
mov dword [esp + 0xc4], ecx
mov dword [esp + 0x94], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0xac], ecx
mov dword [esp + 0x88], ecx
movlpd qword [esp + 0xa0], xmm0
movlpd qword [esp + 0xd0], xmm0
mov dword [esp + 0x3c], ecx
movlpd qword [esp + 0xd8], xmm0
call esi
push 0x402530
push 0xf
call esi
mov edi, 1
add esp, 0x10
cmp dword [ebp + 8], edi
jle 0x404f96
mov esi, dword [esp + 0x14]
mov esi, dword [esi + edi*4]
mov ecx, 0x407ba8
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402740
test dl, dl
je 0x40273c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402740
add eax, 2
add ecx, 2
test dl, dl
jne 0x402720
xor eax, eax
jmp 0x402745
sbb eax, eax
or eax, 1
test eax, eax
je 0x4029f4
mov ecx, str.__debug
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402774
test dl, dl
je 0x402770
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402774
add eax, 2
add ecx, 2
test dl, dl
jne 0x402754
xor eax, eax
jmp 0x402779
sbb eax, eax
or eax, 1
test eax, eax
je 0x4029f4
mov ecx, 0x407bb4
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4027a8
test dl, dl
je 0x4027a4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4027a8
add eax, 2
add ecx, 2
test dl, dl
jne 0x402788
xor eax, eax
jmp 0x4027ad
sbb eax, eax
or eax, 1
test eax, eax
je 0x4029c4
mov ecx, str.__udid
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4027e0
test dl, dl
je 0x4027dc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4027e0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4027c0
xor eax, eax
jmp 0x4027e5
sbb eax, eax
or eax, 1
test eax, eax
je 0x4029c4
mov ecx, 0x407bc0
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402814
test dl, dl
je 0x402810
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402814
add eax, 2
add ecx, 2
test dl, dl
jne 0x4027f4
xor eax, eax
jmp 0x402819
sbb eax, eax
or eax, 1
test eax, eax
je 0x4029b7
mov ecx, str.__network
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402848
test dl, dl
je 0x402844
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402848
add eax, 2
add ecx, 2
test dl, dl
jne 0x402828
xor eax, eax
jmp 0x40284d
sbb eax, eax
or eax, 1
test eax, eax
je 0x4029b7
mov ecx, 0x407bd0
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402880
test dl, dl
je 0x40287c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402880
add eax, 2
add ecx, 2
test dl, dl
jne 0x402860
xor eax, eax
jmp 0x402885
sbb eax, eax
or eax, 1
test eax, eax
je 0x402a5d
mov ecx, str.__help
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4028b4
test dl, dl
je 0x4028b0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4028b4
add eax, 2
add ecx, 2
test dl, dl
jne 0x402894
xor eax, eax
jmp 0x4028b9
sbb eax, eax
or eax, 1
test eax, eax
je 0x402a5d
mov ecx, 0x407bdc
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4028e8
test dl, dl
je 0x4028e4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4028e8
add eax, 2
add ecx, 2
test dl, dl
jne 0x4028c8
xor eax, eax
jmp 0x4028ed
sbb eax, eax
or eax, 1
test eax, eax
je 0x402a2f
mov ecx, str.__version
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402920
test dl, dl
je 0x40291c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402920
add eax, 2
add ecx, 2
test dl, dl
jne 0x402900
xor eax, eax
jmp 0x402925
sbb eax, eax
or eax, 1
test eax, eax
je 0x402a2f
mov ecx, str.backup
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402954
test dl, dl
je 0x402950
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402954
add eax, 2
add ecx, 2
test dl, dl
jne 0x402934
xor eax, eax
jmp 0x402959
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402968
xor ebx, ebx
mov dword [esp + 0x18], ebx
jmp 0x4029ff
mov ecx, str.restore
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402990
test dl, dl
je 0x40298c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402990
add eax, 2
add ecx, 2
test dl, dl
jne 0x402970
xor eax, eax
jmp 0x402995
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4029a4
mov ebx, 1
mov dword [esp + 0x18], ebx
jmp 0x4029ff
cmp dword [esp + 0x28], 0
jne 0x402a5d
mov eax, esi
mov dword [esp + 0x28], eax
jmp 0x402a03
mov dword [esp + 0x8c], 1
jmp 0x4029ff
mov esi, dword [esp + 0x14]
inc edi
mov eax, dword [esi + edi*4]
test eax, eax
je 0x402a7d
cmp byte [eax], 0
je 0x402a7d
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov dword [esp + 0xc0], eax
add esp, 4
mov eax, dword [esp + 0x28]
jmp 0x402a07
push 1
call dword [sym.imp.imobiledevice.dll_idevice_set_debug_level]
add esp, 4
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
inc edi
cmp edi, dword [ebp + 8]
jl 0x402714
cmp ebx, 0xffffffff
je 0x404f96
test eax, eax
jne 0x402a9b
push str.No_target_backup_directory_specified._n
call fcn.004013b0
mov edx, esi
jmp 0x404fa4
push str.1.0.0
push str.idevicebackup
push str._s__s_n
call fcn.004013b0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x14]
call fcn.00402550
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
mov edx, esi
call fcn.00402550
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0xd8]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
je 0x402ada
push dword [esp + 0x28]
push str.ERROR:_Backup_directory___s__does_not_exist__n
call fcn.004013b0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
push 0xb
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
mov edx, str.Info
mov esi, ebx
add esp, 4
sub esi, edx
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x402af0
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x402b00
mov eax, dword [str..plist]
mov esi, dword [esp + 0x28]
mov dword [ecx], eax
mov ax, word [0x407328]
push 0
mov word [ecx + 4], ax
mov al, byte [0x40732a]
push ebx
push esi
mov byte [ecx + 6], al
call fcn.00401080
add esp, 0xc
mov edi, eax
mov dword [esp + 0x4c], edi
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ebx
add esp, 4
cmp dword [esp + 0x18], 1
jne 0x402b8e
lea eax, [esp + 0xd8]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
je 0x402b8e
push edi
call ebx
add esp, 4
push esi
push str.ERROR:_Backup_directory___s__is_invalid._No_Info.plist_found._n
call fcn.004013b0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
push esi
push str.Backup_directory_is___s__n
call fcn.004013b0
mov esi, dword [esp + 0xc4]
xor eax, eax
cmp dword [esp + 0x94], eax
setne al
lea eax, [eax*2 + 2]
push eax
push esi
push 0x40a388
call dword [sym.imp.imobiledevice.dll_idevice_new_with_options]
add esp, 0x14
test eax, eax
je 0x402c16
test esi, esi
je 0x402bf1
push esi
push str.No_device_found_with_udid__s._n
call fcn.004013b0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
push str.No_device_found._n
call fcn.004013b0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
push str.idevicebackup
push 0x40a390
push dword [0x40a388]
call dword [sym.imp.imobiledevice.dll_lockdownd_client_new_with_handshake]
add esp, 0xc
test eax, eax
je 0x402c65
push eax
push str.ERROR:_Could_not_connect_to_lockdownd__error_code__d_n
call fcn.004013b0
push dword [0x40a388]
call dword [sym.imp.imobiledevice.dll_idevice_free]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x10]
push eax
push str.ProductVersion
push 0
push dword [0x40a390]
call dword [sym.imp.imobiledevice.dll_lockdownd_get_value]
mov eax, dword [esp + 0x20]
add esp, 0x10
test eax, eax
je 0x402d33
push eax
mov dword [esp + 0x20], 0
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x402cb5
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x14]
call dword [sym.imp.plist.dll_plist_get_string_val]
add esp, 8
push dword [esp + 0x10]
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x10], 0
test eax, eax
je 0x402d33
push 0xa
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add esp, 0xc
mov esi, eax
push dword [esp + 0x1c]
call ebx
add esp, 4
cmp esi, 3
jle 0x402d33
push str.ERROR:_This_tool_is_only_compatible_with_iOS_3_or_below._For_newer_iOS_versions_please_use_the_idevicebackup2_tool._n
call fcn.004013b0
add esp, 4
push dword [0x40a390]
call dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
add esp, 4
push dword [0x40a388]
call dword [sym.imp.imobiledevice.dll_idevice_free]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.imobiledevice.dll_lockdownd_start_service]
lea eax, [esp + 0x48]
push eax
push str.com.apple.mobile.notification_proxy
push dword [0x40a390]
mov dword [esp + 0xc4], 0
call esi
add esp, 0xc
test eax, eax
jne 0x402df0
mov eax, dword [esp + 0x48]
test eax, eax
je 0x402df0
cmp word [eax], 0
je 0x402df0
lea ecx, [esp + 0xb8]
push ecx
push eax
push dword [0x40a388]
call dword [sym.imp.imobiledevice.dll_np_client_new]
add esp, 0xc
push 0
push 0x401610
push dword [esp + 0xc0]
call dword [sym.imp.imobiledevice.dll_np_set_notify_callback]
add esp, 0xc
mov dword [esp + 0x144], str.com.apple.itunes_client.syncCancelRequest
lea eax, [esp + 0x144]
mov dword [esp + 0x148], str.com.apple.itunes_client.syncSuspendRequest
mov dword [esp + 0x14c], str.com.apple.itunes_client.syncResumeRequest
mov dword [esp + 0x150], str.com.apple.mobile.backup.domain_changed
push eax
push dword [esp + 0xbc]
mov dword [esp + 0x15c], 0
call dword [sym.imp.imobiledevice.dll_np_observe_notifications]
jmp 0x402dff
push str.com.apple.mobile.notification_proxy
push str.ERROR:_Could_not_start_service__s._n
call fcn.004013b0
add esp, 8
mov dword [esp + 0x88], 0
cmp dword [esp + 0x18], 0
jne 0x402e5f
mov eax, dword [esp + 0x48]
xor ecx, ecx
mov word [eax], cx
mov eax, dword [esp + 0x48]
mov byte [eax + 2], cl
lea eax, [esp + 0x48]
push eax
push str.com.apple.afc
push dword [0x40a390]
call esi
add esp, 0xc
test eax, eax
jne 0x402e5f
mov eax, dword [esp + 0x48]
cmp word [eax], 0
je 0x402e63
lea ecx, [esp + 0x88]
push ecx
push eax
push dword [0x40a388]
call dword [sym.imp.imobiledevice.dll_afc_client_new]
add esp, 0xc
mov eax, dword [esp + 0x48]
test eax, eax
je 0x402e79
push eax
call dword [sym.imp.imobiledevice.dll_lockdownd_service_descriptor_free]
add esp, 4
mov dword [esp + 0x48], 0
lea eax, [esp + 0x48]
push eax
push str.com.apple.mobilebackup
push dword [0x40a390]
call esi
add esp, 0xc
test eax, eax
jne 0x404efa
mov eax, dword [esp + 0x48]
test eax, eax
je 0x404efa
movzx eax, word [eax]
test ax, ax
je 0x404efa
push eax
push str.com.apple.mobilebackup
push str.Started___s__service_on_port__d._n
call fcn.004013b0
add esp, 0xc
push 0x40a384
push dword [esp + 0x4c]
push dword [0x40a388]
call dword [sym.imp.imobiledevice.dll_mobilebackup_client_new]
mov eax, dword [esp + 0x54]
add esp, 0xc
test eax, eax
je 0x402ef3
push eax
call dword [sym.imp.imobiledevice.dll_lockdownd_service_descriptor_free]
add esp, 4
mov dword [esp + 0x48], 0
cmp dword [0x40a38c], 0
jle 0x402f14
push str.Aborting_backup._Cancelled_by_user._n
call fcn.004013b0
mov esi, 2
add esp, 4
mov dword [esp + 0x18], esi
jmp 0x402f18
mov esi, dword [esp + 0x18]
lea eax, [esp + 0xd8]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
jne 0x4030a8
push str.Reading_Info.plist_from_backup._n
call fcn.004013b0
add esp, 4
lea ecx, [esp + 0x60]
mov edx, edi
call fcn.004012a0
mov ecx, dword [esp + 0x60]
test ecx, ecx
jne 0x402f73
push str.Could_not_read_Info.plist_n
call fcn.004013b0
mov ecx, dword [esp + 0x64]
add esp, 4
mov dword [esp + 0x24], 1
test ecx, ecx
je 0x4030bc
test esi, esi
jne 0x40307e
call fcn.00401a70
test eax, eax
je 0x40305b
mov eax, dword [esp + 0x60]
test eax, eax
je 0x402fbe
push str.Last_Backup_Date
push eax
call dword [sym.imp.plist.dll_plist_dict_get_item]
add esp, 8
mov esi, eax
push 0
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
sub eax, 0x3a4fc880
push eax
push esi
call dword [sym.imp.plist.dll_plist_set_date_val]
add esp, 0xc
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
mov eax, dword [esp + 0x64]
add esp, 4
mov dword [esp + 0x1c], 0
test eax, eax
je 0x403050
test edi, edi
je 0x403050
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x20]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_to_xml]
mov eax, dword [esp + 0x44]
add esp, 0xc
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc4], 0
push 0x4072bc
push edi
mov dword [esp + 0x94], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x403047
push esi
push dword [esp + 0x94]
push 1
push dword [esp + 0x98]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
push dword [esp + 0x1c]
call ebx
add esp, 4
xorps xmm0, xmm0
movlpd qword [esp + 0x68], xmm0
jmp 0x4030cd
push str.Aborting_backup._Backup_is_not_compatible_with_the_current_device._n
call fcn.004013b0
xorps xmm0, xmm0
mov dword [esp + 0x1c], 2
add esp, 4
movlpd qword [esp + 0x68], xmm0
jmp 0x403269
test ecx, ecx
je 0x4030bc
cmp esi, 1
jne 0x4030bc
call fcn.00401a70
test eax, eax
jne 0x4030bc
push str.Aborting_restore._Backup_data_is_not_compatible_with_the_current_device._n
call fcn.004013b0
mov esi, 2
add esp, 4
mov dword [esp + 0x18], esi
jmp 0x4030bc
cmp esi, 1
jne 0x4030b4
push str.Aborting_restore._Info.plist_is_missing._n
jmp 0x403060
mov dword [esp + 0x24], 1
xorps xmm0, xmm0
movlpd qword [esp + 0x68], xmm0
test esi, esi
jne 0x403269
mov ecx, str.com.apple.itunes_mobdev.syncWillStart
call fcn.004023a0
lea eax, [esp + 0x68]
push eax
push 2
push str._com.apple.itunes.lock_sync
push dword [esp + 0x94]
call dword [sym.imp.imobiledevice.dll_afc_file_open]
mov eax, dword [esp + 0x78]
add esp, 0x10
or eax, dword [esp + 0x6c]
je 0x403269
mov ecx, str.com.apple.itunes_mobdev.syncLockRequest
call fcn.004023a0
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
xor edi, edi
push 6
push dword [esp + 0x70]
push dword [esp + 0x70]
push dword [esp + 0x94]
call dword [sym.imp.imobiledevice.dll_afc_file_lock]
add esp, 0x10
test eax, eax
je 0x40325b
cmp eax, 0x13
jne 0x4031c6
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea eax, [esp + 0xa8]
push eax
call esi
lea eax, [esp + 0xc0]
push eax
call esi
mov ecx, dword [esp + 0xc0]
sub ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0xc4]
sbb edx, dword [esp + 0xac]
call fcn.00406050
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
cvtsd2ss xmm0, xmm0
movss dword [esp + 0x38], xmm0
call fcn.00406050
movss xmm1, dword [esp + 0x38]
cvtsd2ss xmm0, xmm0
divss xmm1, xmm0
movss xmm0, dword [0x408bd4]
mulss xmm1, dword [0x408bd0]
mulss xmm1, dword [0x408bd0]
comiss xmm0, xmm1
ja 0x403153
mov eax, dword [esp + 0x18]
jmp 0x40320a
push eax
push str.ERROR:_could_not_lock_file__error_code:__d_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push dword [esp + 0x90]
call dword [sym.imp.imobiledevice.dll_afc_file_close]
xorps xmm0, xmm0
mov eax, 2
add esp, 0xc
movlpd qword [esp + 0x68], xmm0
mov dword [esp + 0x18], eax
inc edi
cmp edi, 0x32
jl 0x403113
mov dword [esp + 0x18], eax
jne 0x403265
push str.ERROR:_timeout_while_locking_for_sync_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401010
push dword [esp + 0x74]
push dword [esp + 0x74]
push dword [esp + 0x98]
call dword [sym.imp.imobiledevice.dll_afc_file_close]
xorps xmm0, xmm0
mov dword [esp + 0x2c], 2
add esp, 0x14
movlpd qword [esp + 0x68], xmm0
jmp 0x403265
mov ecx, str.com.apple.itunes_mobdev.syncDidStart
call fcn.004023a0
mov edi, dword [esp + 0x4c]
push 0xf
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, str.Manifest
mov dword [esp + 0x3c], eax
mov esi, eax
add esp, 4
sub esi, edx
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x403281
lea ecx, [eax - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x403291
mov eax, dword [str..plist]
mov esi, dword [esp + 0x38]
mov dword [ecx], eax
mov ax, word [0x407328]
push 0
mov word [ecx + 4], ax
mov al, byte [0x40732a]
push esi
push dword [esp + 0x30]
mov byte [ecx + 6], al
call fcn.00401080
add esp, 0xc
mov dword [esp + 0x2c], eax
push esi
call ebx
mov eax, dword [esp + 0x1c]
add esp, 4
mov esi, dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
sub eax, 0
je 0x40419a
sub eax, 1
jne 0x404e8d
mov eax, dword [0x40a390]
test eax, eax
je 0x403306
push eax
call esi
add esp, 4
mov dword [0x40a390], 0
push 0xd
mov dword [esp + 0x20], 0
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
mov edx, str.Status
mov esi, edi
add esp, 4
sub esi, edx
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x403324
lea ecx, [edi - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x403334
mov eax, dword [str..plist]
mov dword [ecx], eax
mov ax, word [0x407328]
push 0
mov word [ecx + 4], ax
mov al, byte [0x40732a]
push edi
push dword [esp + 0x30]
mov byte [ecx + 6], al
call fcn.00401080
add esp, 0xc
mov esi, eax
push edi
call ebx
add esp, 4
lea ecx, [esp + 0x1c]
mov edx, esi
call fcn.004012a0
push esi
call ebx
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
jne 0x40339e
push str.Could_not_read_Status.plist__n
call fcn.004013b0
add esp, 4
push str.ERROR:_Cannot_ensure_we_restore_from_a_successful_backup._Aborting._n
jmp 0x404e85
push str.Backup_Success
push eax
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x404174
mov edi, dword [sym.imp.plist.dll_plist_get_node_type]
push esi
call edi
add esp, 4
test eax, eax
jne 0x404174
mov byte [esp + 0x53], al
lea eax, [esp + 0x53]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_bool_val]
push dword [esp + 0x24]
movzx esi, byte [esp + 0x5f]
call dword [sym.imp.plist.dll_plist_free]
add esp, 0xc
test esi, esi
je 0x404190
push str.Reading_existing_Manifest._n
call fcn.004013b0
mov esi, dword [esp + 0x30]
lea ecx, [esp + 0x58]
add esp, 4
mov edx, esi
call fcn.004012a0
cmp dword [esp + 0x54], 0
jne 0x40342a
push str.Could_not_read_Manifest.plist._Aborting._n
call fcn.004013b0
add esp, 4
jmp 0x404e91
push str.Verifying_backup_integrity__please_wait._n
call fcn.004013b0
mov esi, dword [sym.imp.plist.dll_plist_dict_get_item]
add esp, 4
xorps xmm0, xmm0
mov dword [esp + 0xb4], 0
movlpd qword [esp + 0xc0], xmm0
push str.Data
push dword [esp + 0x58]
call esi
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x40416a
push eax
call edi
add esp, 4
cmp eax, 7
jne 0x40416a
mov edi, dword [sym.imp.plist.dll_plist_get_data_val]
lea eax, [esp + 0xc0]
push eax
lea eax, [esp + 0xb8]
push eax
push dword [esp + 0x18]
call edi
add esp, 0xc
mov dword [esp + 0x7c], 0
cmp dword [esp + 0xb4], 0
je 0x404160
push str.AuthVersion
push dword [esp + 0x58]
xorps xmm0, xmm0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
movlpd qword [esp + 0x60], xmm0
call esi
lea ecx, [esp + 0x28]
mov dword [esp + 0x18], eax
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_string_val]
mov esi, dword [esp + 0x30]
add esp, 0x10
test esi, esi
je 0x4035ff
mov ecx, 0x4085d8
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403520
test dl, dl
je 0x40351c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403520
add eax, 2
add ecx, 2
test dl, dl
jne 0x403500
xor eax, eax
jmp 0x403525
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4035f1
push str.AuthSignature
push dword [esp + 0x58]
call dword [sym.imp.plist.dll_plist_dict_get_item]
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x403569
push eax
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 7
jne 0x403569
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x18]
call edi
add esp, 0xc
cmp dword [esp + 0x24], 0
je 0x4035d9
cmp dword [esp + 0x58], 0x14
jne 0x4035d9
cmp dword [esp + 0x5c], 0
jne 0x4035d9
lea eax, [esp + 0x144]
push eax
push dword [esp + 0xc4]
push dword [esp + 0xbc]
call dword [sym.imp.libcrypto_1_1.dll_SHA1]
mov ecx, dword [esp + 0x30]
lea esi, [esp + 0x150]
add esp, 0xc
xor edx, edx
sub esi, ecx
nop dword [eax]
mov al, byte [ecx]
cmp al, byte [esi + ecx]
jne 0x4035c5
inc edx
inc ecx
cmp edx, 0x14
jl 0x4035b0
mov ecx, 1
jmp 0x4035c7
xor ecx, ecx
test ecx, ecx
mov eax, str.ERROR:_AuthSignature_is_NOT_VALID_n
mov edx, str.AuthSignature_is_valid_n
cmovne eax, edx
push eax
jmp 0x4035de
push str.Could_not_get_AuthSignature_from_manifest__n
call fcn.004013b0
add esp, 4
push dword [esp + 0x24]
call ebx
add esp, 4
jmp 0x4035ff
push esi
push str.Unknown_AuthVersion__s__cannot_verify_AuthSignature_n
call fcn.004013b0
add esp, 8
lea eax, [esp + 0x7c]
push eax
push dword [esp + 0xc4]
push dword [esp + 0xbc]
call dword [sym.imp.plist.dll_plist_from_bin]
add esp, 0xc
push dword [esp + 0xb4]
call ebx
mov eax, dword [esp + 0x80]
add esp, 4
test eax, eax
je 0x404160
push str.Files
push eax
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov edi, eax
add esp, 8
mov dword [esp + 0x4c], edi
test edi, edi
je 0x403791
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 5
jne 0x403791
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push edi
call dword [sym.imp.plist.dll_plist_dict_new_iter]
add esp, 8
cmp dword [esp + 0x14], 0
je 0x403791
push edi
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0
call dword [sym.imp.plist.dll_plist_dict_get_size]
add esp, 4
mov dword [esp + 0x38], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
mov edi, 1
push eax
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x58]
call dword [sym.imp.plist.dll_plist_dict_next_item]
add esp, 0x10
cmp dword [esp + 0x10], 0
je 0x403754
mov esi, 0x64
nop
mov ecx, dword [esp + 0x38]
mov eax, esi
cdq
idiv ecx
push eax
push ecx
push edi
push str.Verifying_file__d__d___d_____r
call fcn.004013b0
push dword [esp + 0x20]
mov edx, dword [esp + 0x44]
inc edi
mov ecx, dword [esp + 0x3c]
add esi, 0x64
call fcn.00401ba0
add esp, 0x14
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], 0
push dword [esp + 0x30]
call ebx
add esp, 4
mov dword [esp + 0x30], 0
cmp dword [esp + 0x1c], 0
je 0x403754
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x58]
call dword [sym.imp.plist.dll_plist_dict_next_item]
add esp, 0x10
cmp dword [esp + 0x10], 0
jne 0x4036e0
push 0x4072d0
call fcn.004013b0
add esp, 4
push dword [esp + 0x14]
call ebx
add esp, 4
cmp dword [esp + 0x1c], 0
jne 0x403780
push dword [esp + 0x7c]
call dword [sym.imp.plist.dll_plist_free]
jmp 0x404e8a
push str.All_backup_files_appear_to_be_valid_n
call fcn.004013b0
mov edi, dword [esp + 0x50]
add esp, 4
push str.Requesting_restore_from_device..._n
call fcn.004013b0
add esp, 4
push 0x408190
push 7
push dword [esp + 0x5c]
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_request_restore]
add esp, 0x10
test eax, eax
je 0x40381b
cmp eax, 0xfffffffa
jne 0x4037dd
push str.ERROR:_Could_not_start_restore_process:_backup_protocol_version_mismatch__n
call fcn.004013b0
add esp, 4
push dword [esp + 0x7c]
call dword [sym.imp.plist.dll_plist_free]
jmp 0x404e8a
cmp eax, 0xfffffff9
jne 0x4037fe
push str.ERROR:_Could_not_start_restore_process:_device_refused_to_start_the_restore_process._n
call fcn.004013b0
add esp, 4
push dword [esp + 0x7c]
call dword [sym.imp.plist.dll_plist_free]
jmp 0x404e8a
push eax
push str.ERROR:_Could_not_start_restore_process:_unspecified_error_occurred___d__n
call fcn.004013b0
add esp, 8
push dword [esp + 0x7c]
call dword [sym.imp.plist.dll_plist_free]
jmp 0x404e8a
push str.Entered_restore_mode._n
call fcn.004013b0
xor esi, esi
add esp, 4
mov dword [esp + 0x30], esi
test edi, edi
je 0x403ddf
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 5
jne 0x403ddf
lea eax, [esp + 0x24]
mov dword [esp + 0x24], esi
push eax
push edi
call dword [sym.imp.plist.dll_plist_dict_new_iter]
add esp, 8
cmp dword [esp + 0x24], esi
je 0x403ddf
push edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
call dword [sym.imp.plist.dll_plist_dict_get_size]
add esp, 4
mov dword [esp + 0x70], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x1c], esi
xorps xmm0, xmm0
mov byte [esp + 0x38], 0
movlpd qword [esp + 0x90], xmm0
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x68], esi
push eax
push dword [esp + 0x2c]
mov dword [esp + 0x1c], esi
push edi
call dword [sym.imp.plist.dll_plist_dict_next_item]
add esp, 0x10
cmp dword [esp + 0x10], esi
je 0x403dc5
mov edi, dword [esp + 0x94]
mov ebx, dword [esp + 0x90]
mov dword [esp + 0x20], esi
nop dword [eax]
mov esi, dword [esp + 0x14]
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4038e0
sub ecx, edx
lea eax, [ecx + 8]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, eax
mov dword [esp + 0x94], eax
add esp, 4
sub edx, esi
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x403901
lea ecx, [eax - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x403911
mov eax, dword [str..mdinfo]
push 0
push dword [esp + 0x94]
mov dword [ecx], eax
mov eax, dword [0x407644]
push dword [esp + 0x30]
mov dword [ecx + 4], eax
call fcn.00401080
add esp, 0xc
mov esi, eax
push dword [esp + 0x90]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea ecx, [esp + 0x18]
mov edx, esi
call fcn.004012a0
push str.IsEncrypted
push dword [esp + 0x1c]
call dword [sym.imp.plist.dll_plist_dict_get_item]
lea ecx, [esp + 0x40]
mov dword [esp + 0x6c], eax
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_bool_val]
push str.Metadata
push dword [esp + 0x2c]
call dword [sym.imp.plist.dll_plist_dict_get_item]
lea ecx, [esp + 0xb0]
mov dword [esp + 0x7c], eax
push ecx
lea ecx, [esp + 0xc0]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_data_val]
add esp, 0x24
mov dword [esp + 0x64], 0
lea eax, [esp + 0x64]
push eax
push dword [esp + 0x9c]
push dword [esp + 0xac]
call dword [sym.imp.plist.dll_plist_from_bin]
add esp, 0xc
push str.Path
push dword [esp + 0x68]
call dword [sym.imp.plist.dll_plist_dict_get_item]
lea ecx, [esp + 0x88]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_string_val]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x80]
cdq
idiv ecx
push eax
push ecx
push dword [esp + 0x34]
push dword [esp + 0x9c]
push str.Restoring_file__s__d__d___d___...
call fcn.004013b0
add esp, 0x24
push dword [esp + 0x10]
call dword [sym.imp.plist.dll_plist_copy]
add esp, 4
push eax
push str.DLFileAttributesKey
push dword [esp + 0x20]
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push esi
call dword [sym.imp.plist.dll_plist_new_string]
add esp, 4
push eax
push str.DLFileSource
push dword [esp + 0x20]
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push str._tmp_RestoreFile.plist
call dword [sym.imp.plist.dll_plist_new_string]
add esp, 4
push eax
push str.DLFileDest
push dword [esp + 0x20]
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push dword [esp + 0x38]
call dword [sym.imp.plist.dll_plist_new_bool]
add esp, 4
push eax
push str.DLFileIsEncrypted
push dword [esp + 0x20]
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push edi
mov edi, dword [sym.imp.plist.dll_plist_new_uint]
push ebx
call edi
mov ebx, dword [sym.imp.plist.dll_plist_dict_set_item]
push eax
push str.DLFileOffsetKey
push dword [esp + 0x28]
call ebx
add esp, 0x14
push 0
push dword [esp + 0x38]
call edi
push eax
push str.DLFileStatusKey
push dword [esp + 0x28]
call ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x14
push esi
call ebx
mov esi, dword [esp + 0x18]
add esp, 4
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403ae0
sub ecx, edx
lea eax, [ecx + 8]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
mov edx, edi
sub edx, esi
nop dword [eax]
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x403b00
lea ecx, [edi - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x403b10
mov eax, dword [str..mddata]
push 0
mov dword [ecx], eax
mov eax, dword [0x40762c]
push edi
push dword [esp + 0x30]
mov dword [ecx + 4], eax
call fcn.00401080
add esp, 0xc
mov esi, eax
push edi
call ebx
add esp, 4
lea eax, [esp + 0x108]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64]
add esp, 8
test eax, eax
jne 0x40407b
mov eax, dword [esp + 0x120]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x124]
push 0x4072b8
push esi
mov dword [esp + 0xa4], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [esp + 0x58], eax
test eax, eax
je 0x404050
push esi
call ebx
xorps xmm0, xmm0
add esp, 4
movlpd qword [esp + 0x90], xmm0
mov edi, dword [esp + 0x94]
mov ebx, dword [esp + 0x90]
nop dword [eax]
nop word [eax + eax]
push dword [esp + 0x58]
lea eax, [esp + 0x15c]
push 0x2000
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, dword [esp + 0xa8]
add esp, 0x10
mov ecx, dword [esp + 0x9c]
sub edx, ebx
mov dword [esp + 0x90], eax
sbb ecx, edi
test ecx, ecx
ja 0x403c0a
jb 0x403c03
cmp edx, 0x2000
ja 0x403c0a
mov esi, 2
jmp 0x403c0f
mov esi, 1
push str.DLFileOffsetKey
push dword [esp + 0x1c]
mov dword [esp + 0x3c], esi
call dword [sym.imp.plist.dll_plist_dict_remove_item]
push edi
push ebx
call dword [sym.imp.plist.dll_plist_new_uint]
push eax
push str.DLFileOffsetKey
push dword [esp + 0x30]
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0x1c
push str.DLFileStatusKey
push dword [esp + 0x1c]
call dword [sym.imp.plist.dll_plist_dict_remove_item]
push 0
push esi
call dword [sym.imp.plist.dll_plist_new_uint]
push eax
push str.DLFileStatusKey
push dword [esp + 0x30]
call dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0x1c
call dword [sym.imp.plist.dll_plist_new_array]
push str.DLSendFile
mov esi, eax
call dword [sym.imp.plist.dll_plist_new_string]
add esp, 4
push eax
push esi
call dword [sym.imp.plist.dll_plist_array_append_item]
push 0
push dword [esp + 0x9c]
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.plist.dll_plist_new_data]
add esp, 0x14
push eax
push esi
call dword [sym.imp.plist.dll_plist_array_append_item]
push dword [esp + 0x20]
call dword [sym.imp.plist.dll_plist_copy]
add esp, 0xc
push eax
push esi
call dword [sym.imp.plist.dll_plist_array_append_item]
push esi
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_send]
add esp, 0x10
test eax, eax
jne 0x40403b
mov eax, dword [esp + 0x34]
cmp eax, 2
jne 0x403cfb
push 0
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_receive_restore_file_received]
add esp, 8
test eax, eax
jne 0x404000
mov eax, dword [esp + 0x34]
add ebx, dword [esp + 0x90]
mov dword [esp + 0x30], eax
adc edi, 0
cmp eax, 2
jne 0x403d2b
push str.DONE_n
call fcn.004013b0
add esp, 4
push esi
call dword [sym.imp.plist.dll_plist_free]
mov esi, dword [esp + 0x38]
add esp, 4
jmp 0x403d43
push esi
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x34]
add esp, 4
mov esi, eax
mov dword [esp + 0x34], esi
test eax, eax
je 0x403d5f
cmp edi, dword [esp + 0x9c]
jb 0x403bc0
ja 0x403d5f
cmp ebx, dword [esp + 0x98]
jb 0x403bc0
push dword [esp + 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x30], 1
test esi, esi
je 0x404043
inc dword [esp + 0x1c]
lea eax, [esp + 0x10]
add dword [esp + 0x20], 0x64
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x58]
call dword [sym.imp.plist.dll_plist_dict_next_item]
add esp, 0x10
cmp dword [esp + 0x10], 0
jne 0x4038d0
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [esp + 0x30]
push dword [esp + 0x24]
call ebx
add esp, 4
push dword [esp + 0x1c]
push str.Restored__d_files_on_device._n
call fcn.004013b0
add esp, 8
push str.Applications
push dword [esp + 0x80]
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov edi, eax
add esp, 8
mov dword [esp + 0x70], edi
test edi, edi
je 0x404124
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 5
jne 0x404124
test esi, esi
je 0x404124
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
push eax
push edi
call dword [sym.imp.plist.dll_plist_dict_new_iter]
add esp, 8
cmp dword [esp + 0x34], 0
je 0x404124
push edi
mov dword [esp + 0x18], 0
call dword [sym.imp.plist.dll_plist_dict_get_size]
add esp, 4
mov dword [esp + 0x58], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x20], 1
mov dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x3c]
push edi
call dword [sym.imp.plist.dll_plist_dict_next_item]
add esp, 0x10
cmp dword [esp + 0x10], 0
je 0x403fce
mov edi, 0x64
mov dword [esp + 0x38], edi
mov ecx, dword [esp + 0x58]
mov eax, edi
cdq
idiv ecx
mov dword [esp + 0x30], esi
push eax
push ecx
push dword [esp + 0x28]
push dword [esp + 0x20]
push str.Restoring_Application__s__d__d___d___...
call fcn.004013b0
add esp, 0x14
push str.AppInfo
push dword [esp + 0x14]
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
call dword [sym.imp.plist.dll_plist_new_dict]
push esi
mov edi, eax
call dword [sym.imp.plist.dll_plist_copy]
mov esi, dword [sym.imp.plist.dll_plist_dict_set_item]
add esp, 0xc
push eax
push str.AppInfo
push edi
call esi
add esp, 0xc
push str.BackupMessageRestoreApplicationSent
call dword [sym.imp.plist.dll_plist_new_string]
add esp, 4
push eax
push str.BackupMessageTypeKey
push edi
call esi
add esp, 0xc
call dword [sym.imp.plist.dll_plist_new_array]
push str.DLMessageProcessMessage
mov esi, eax
call dword [sym.imp.plist.dll_plist_new_string]
add esp, 4
push eax
push esi
call dword [sym.imp.plist.dll_plist_array_append_item]
push edi
push esi
call dword [sym.imp.plist.dll_plist_array_append_item]
push esi
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_send]
add esp, 0x18
test eax, eax
jne 0x4040f3
mov edi, dword [sym.imp.plist.dll_plist_free]
push esi
call edi
mov esi, dword [esp + 0x34]
add esp, 4
test esi, esi
je 0x403f6f
push 0
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_receive_restore_application_received]
add esp, 8
test eax, eax
jne 0x4040a6
push dword [esp + 0x14]
mov dword [esp + 0x14], 0
call ebx
add esp, 4
mov dword [esp + 0x14], 0
test esi, esi
je 0x403fd4
push str.DONE_n
call fcn.004013b0
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x14]
inc dword [esp + 0x24]
add esp, 4
add edi, 0x64
mov dword [esp + 0x38], edi
push eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x3c]
push dword [esp + 0x7c]
call dword [sym.imp.plist.dll_plist_dict_next_item]
add esp, 0x10
cmp dword [esp + 0x10], 0
jne 0x403e91
mov edi, dword [sym.imp.plist.dll_plist_free]
push dword [esp + 0x34]
call ebx
add esp, 4
test esi, esi
je 0x4040d3
push str.All_applications_restored._n
call fcn.004013b0
add esp, 4
push dword [esp + 0x7c]
call edi
add esp, 4
jmp 0x404135
push eax
push str.ERROR:_Did_not_receive_an_ack_for_the_sent_file_due_to_error__d._Aborting..._n
call fcn.004013b0
push esi
call dword [sym.imp.plist.dll_plist_free]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0xc
push dword [esp + 0x14]
call ebx
add esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
xor esi, esi
jmp 0x403dc5
push eax
push str.ERROR:_Unable_to_send_file_hunk_due_to_error__d._Aborting..._n
jmp 0x404006
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor esi, esi
jmp 0x403dc5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push esi
push str.ERROR:_could_not_open_local_file__s:__s_n
call fcn.004013b0
add esp, 0xc
push esi
call ebx
add esp, 4
jmp 0x403dc1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push esi
push str.ERROR:_stat___failed_for__s:__s_n
call fcn.004013b0
add esp, 0xc
push esi
call ebx
add esp, 4
jmp 0x403dc1
push eax
push str.ERROR:_Failed_to_receive_an_ack_from_the_device_for_this_application_due_to_error__d._Aborting..._n
call fcn.004013b0
push dword [esp + 0x1c]
mov dword [esp + 0x1c], 0
call ebx
add esp, 0xc
push dword [esp + 0x34]
mov dword [esp + 0x18], 0
call ebx
add esp, 4
push str.Failed_to_restore_applications._n
call fcn.004013b0
add esp, 4
push dword [esp + 0x7c]
call edi
add esp, 4
push str.Restore_Failed._n
jmp 0x404e85
push eax
push dword [esp + 0x18]
push str.ERROR:_Unable_to_restore_application__s_due_to_error__d._Aborting..._n
call fcn.004013b0
mov edi, dword [sym.imp.plist.dll_plist_free]
add esp, 0xc
push esi
call edi
add esp, 4
mov dword [esp + 0x10], 0
push dword [esp + 0x14]
call ebx
add esp, 4
jmp 0x4040c2
push dword [esp + 0x7c]
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
test esi, esi
je 0x4040e9
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_send_restore_complete]
add esp, 4
test eax, eax
je 0x404156
push eax
push str.ERROR:_Could_not_send_BackupMessageRestoreComplete__error_code__d_n
call fcn.004013b0
add esp, 8
push str.Restore_Successful._n
jmp 0x404e85
push str.Could_not_read_plist_from_Manifest.plist_Data_key__n
jmp 0x404e85
push str.Could_not_read_Data_key_from_Manifest.plist__n
jmp 0x404e85
push str.mobilebackup_read_status
push str._s:_ERROR_could_not_get_Backup_Success_key_from_Status.plist__n
call fcn.004013b0
push dword [esp + 0x24]
call dword [sym.imp.plist.dll_plist_free]
add esp, 0xc
push str.ERROR:_Cannot_ensure_we_restore_from_a_successful_backup._Aborting._n
jmp 0x404e85
push str.Starting_backup..._n
call fcn.004013b0
add esp, 4
cmp dword [esp + 0x24], 0
jne 0x4041e8
push str.Reading_existing_Manifest._n
call fcn.004013b0
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x58]
add esp, 4
call fcn.004012a0
cmp dword [esp + 0x54], 0
jne 0x4042a4
push str.Could_not_read_Manifest.plist__switching_to_full_backup_mode._n
call fcn.004013b0
add esp, 4
mov dword [esp + 0x24], 1
mov eax, dword [esp + 0x60]
test eax, eax
je 0x404202
push eax
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
mov dword [esp + 0x60], 0
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
push str.Creating_Info.plist_for_new_backup._n
call fcn.004013b0
mov ecx, dword [esp + 0xc0]
add esp, 4
call fcn.00401670
mov dword [esp + 0x60], eax
mov dword [esp + 0x20], 0
test eax, eax
je 0x4042a4
test edi, edi
je 0x4042a4
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_to_xml]
mov eax, dword [esp + 0x64]
add esp, 0xc
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x3c], 0
push 0x4072bc
push edi
mov dword [esp + 0x40], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x404295
push esi
push dword [esp + 0x74]
push 1
push dword [esp + 0x44]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
push dword [esp + 0x20]
call ebx
mov esi, dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
add esp, 4
push edi
call ebx
add esp, 4
push dword [esp + 0x60]
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [0x40a390]
add esp, 4
mov dword [esp + 0x60], 0
test eax, eax
je 0x4042d8
push eax
call esi
add esp, 4
mov dword [0x40a390], 0
mov ecx, dword [esp + 0x28]
xor edx, edx
call fcn.00401910
push str.Requesting_backup_from_device..._n
call fcn.004013b0
add esp, 4
push 0x408190
push 0x40732c
push dword [esp + 0x5c]
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_request_backup]
add esp, 0x10
test eax, eax
jne 0x404e68
cmp dword [esp + 0x24], 0
mov ecx, str.Full_backup_mode._n
mov eax, str.Incremental_backup_mode._n
cmovne eax, ecx
push eax
call fcn.004013b0
add esp, 4
push str.Please_wait._Device_is_preparing_backup_data..._n
call fcn.004013b0
xorps xmm0, xmm0
mov dword [esp + 0x88], 0
movlpd qword [esp + 0x74], xmm0
add esp, 4
mov eax, dword [esp + 0x74]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x70]
movlpd qword [esp + 0x58], xmm0
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x58]
movlpd qword [esp + 0xa8], xmm0
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x8c], 0
mov byte [esp + 0x47], 0
mov dword [esp + 0x90], eax
nop dword [eax]
nop word [eax + eax]
lea eax, [esp + 0x84]
push eax
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_receive]
mov eax, dword [esp + 0x8c]
add esp, 8
test eax, eax
jne 0x4043ef
push str.Device_is_not_ready_yet._Going_to_try_again_in_2_seconds..._n
call fcn.004013b0
add esp, 4
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4049f1
push 0
push eax
call dword [sym.imp.plist.dll_plist_array_get_item]
mov esi, eax
mov dword [esp + 0x40], 0
push esi
mov dword [esp + 0x1c], esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 0xc
cmp eax, 3
jne 0x404463
lea eax, [esp + 0x38]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_string_val]
mov edi, dword [esp + 0x40]
add esp, 8
mov ecx, str.DLSendFile
mov eax, edi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404450
test dl, dl
je 0x40444c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404450
add eax, 2
add ecx, 2
test dl, dl
jne 0x404430
xor esi, esi
jmp 0x404455
sbb esi, esi
or esi, 1
push edi
call ebx
add esp, 4
test esi, esi
jne 0x404aac
push 2
push dword [esp + 0x88]
call dword [sym.imp.plist.dll_plist_array_get_item]
mov esi, dword [esp + 0x1c]
add esp, 8
mov edi, eax
test esi, esi
jne 0x4044d5
cmp dword [esp + 0x30], esi
jne 0x4044d5
push str.BackupTotalSizeKey
push edi
call dword [sym.imp.plist.dll_plist_dict_get_item]
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x4044d5
lea ecx, [esp + 0xc8]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_uint_val]
push dword [esp + 0xd4]
push dword [esp + 0xd4]
call fcn.004011a0
mov esi, eax
push esi
push str.Backup_data_requires__s_on_the_disk._n
call fcn.004013b0
push esi
call ebx
mov esi, dword [esp + 0x30]
add esp, 0x1c
push str.DLFileStatusKey
push edi
call dword [sym.imp.plist.dll_plist_dict_get_item]
lea ecx, [esp + 0xd8]
mov dword [esp + 0x18], eax
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_uint_val]
mov eax, dword [esp + 0xe0]
push str.BackupManifestKey
push edi
mov dword [esp + 0x64], eax
call dword [sym.imp.plist.dll_plist_dict_get_item]
xor cl, cl
mov dword [esp + 0x28], eax
add esp, 0x18
mov byte [esp + 0x47], cl
test eax, eax
je 0x40452f
lea ecx, [esp + 0x47]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_bool_val]
mov cl, byte [esp + 0x4f]
add esp, 8
xor eax, eax
cmp cl, 1
sete al
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x40463c
test eax, eax
jne 0x40463c
mov esi, dword [sym.imp.plist.dll_plist_dict_get_item]
push str.DLFileSource
push edi
call esi
lea ecx, [esp + 0x94]
mov dword [esp + 0x18], eax
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_string_val]
push str.DLFileAttributesKey
push edi
call esi
push str.FileSize
push eax
mov dword [esp + 0x30], eax
call esi
lea ecx, [esp + 0xc8]
mov dword [esp + 0x30], eax
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_uint_val]
mov ecx, dword [esp + 0xb8]
add ecx, dword [esp + 0xd0]
mov eax, dword [esp + 0x5c]
adc eax, dword [esp + 0xd4]
push eax
push ecx
mov dword [esp + 0xc0], ecx
mov dword [esp + 0x64], eax
call fcn.004011a0
mov esi, eax
push esi
push 0x4083c0
call fcn.004013b0
push esi
call ebx
add esp, 0x3c
push dword [esp + 0xcc]
push dword [esp + 0xcc]
call fcn.004011a0
mov esi, eax
push esi
push str.__s_:
call fcn.004013b0
push esi
call ebx
add esp, 0x14
push dword [esp + 0xac]
push dword [esp + 0xac]
call fcn.004011a0
mov esi, eax
push esi
push dword [esp + 0x98]
push str.Receiving_file__s___s_...__n
call fcn.004013b0
add esp, 0x14
push esi
call ebx
mov eax, dword [esp + 0x90]
add esp, 4
test eax, eax
je 0x404638
push eax
call ebx
add esp, 4
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x4c], 2
jne 0x4047b1
test eax, eax
jne 0x4047b1
mov esi, dword [sym.imp.plist.dll_plist_dict_get_item]
push str.BackupFileInfo
push edi
call esi
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x4047ad
push str.DLFileDest
push edi
call esi
lea ecx, [esp + 0x88]
mov dword [esp + 0x18], eax
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_string_val]
mov esi, dword [esp + 0x90]
add esp, 0x10
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404696
sub ecx, edx
lea eax, [ecx + 8]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, eax
mov dword [esp + 0x3c], eax
add esp, 4
sub edx, esi
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x4046b4
lea ecx, [eax - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4046c4
mov eax, dword [str..mdinfo]
push 0
push dword [esp + 0x3c]
mov dword [ecx], eax
mov eax, dword [0x407644]
push dword [esp + 0x30]
mov dword [ecx + 4], eax
call fcn.00401080
add esp, 0xc
mov esi, eax
push dword [esp + 0x38]
call ebx
add esp, 4
lea eax, [esp + 0xd8]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
jne 0x40471a
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
push str.BackupFileInfo
push edi
call dword [sym.imp.plist.dll_plist_dict_get_item]
add esp, 8
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], 0
test eax, eax
je 0x4047a7
test esi, esi
je 0x4047a7
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_to_bin]
mov eax, dword [esp + 0x64]
add esp, 0xc
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x3c], 0
push 0x4072bc
push esi
mov dword [esp + 0x40], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
je 0x40479e
push eax
push dword [esp + 0x74]
push 1
push dword [esp + 0x44]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [esp + 0x28]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
push dword [esp + 0x20]
call ebx
add esp, 4
push esi
call ebx
add esp, 4
inc dword [esp + 0x30]
mov esi, dword [sym.imp.plist.dll_plist_dict_get_item]
push str.BackupFileInfo
push edi
call esi
add esp, 8
mov dword [esp + 0x10], eax
test edi, edi
je 0x40490f
push str.DLFileDest
push edi
call esi
lea ecx, [esp + 0x88]
mov dword [esp + 0x18], eax
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_string_val]
mov edi, dword [esp + 0x2c]
xor ecx, ecx
mov edx, dword [esp + 0x90]
test edi, edi
mov eax, str..mddata
cmovne eax, ecx
mov ecx, dword [esp + 0x38]
push eax
call fcn.00401860
add esp, 0x14
mov esi, eax
cmp dword [esp + 0x14], 0
jne 0x404836
lea eax, [esp + 0xd8]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
jne 0x404836
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
push 1
push dword [esp + 0x88]
call dword [sym.imp.plist.dll_plist_array_get_item]
lea ecx, [esp + 0xa0]
push ecx
lea ecx, [esp + 0xb0]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_get_data_val]
mov eax, dword [esp + 0xac]
add esp, 0x14
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xa4]
push 0x4072bc
push esi
mov dword [esp + 0x40], eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
je 0x4048b5
push eax
push dword [esp + 0x74]
push 1
push dword [esp + 0x44]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [esp + 0x30]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
test edi, edi
jne 0x4048d7
mov eax, dword [esp + 0x64]
add eax, dword [esp + 0x98]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x24]
adc eax, dword [esp + 0x9c]
mov dword [esp + 0x24], eax
cmp dword [esp + 0x4c], 2
jne 0x4048f0
test edi, edi
je 0x4048f0
push dword [esp + 0x2c]
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
add esp, 8
push dword [esp + 0xa4]
call ebx
add esp, 4
mov dword [esp + 0xa4], 0
push esi
call ebx
add esp, 4
jmp 0x404913
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x404987
cmp dword [esp + 0x14], edi
jne 0x40493d
mov esi, dword [esp + 0x4c]
cmp esi, 2
jne 0x40493d
movsd xmm0, qword [0x408ba8]
call fcn.00402460
mov dword [esp + 0x14], 1
jmp 0x40498f
cmp dword [esp + 0xac], 0
mov esi, dword [esp + 0xa8]
ja 0x404952
test esi, esi
je 0x404987
mov eax, dword [esp + 0x24]
mov ecx, 0x64
push dword [esp + 0xac]
mul ecx
mov edx, 0x64
mov ecx, eax
mov eax, dword [esp + 0x68]
mul edx
push esi
add ecx, edx
push ecx
push eax
call fcn.00405c60
mov ecx, eax
call fcn.00405ff0
call fcn.00402460
inc dword [esp + 0x14]
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x84]
test eax, eax
je 0x4049a4
push eax
call dword [sym.imp.plist.dll_plist_free]
add esp, 4
mov dword [esp + 0x84], 0
cmp esi, 2
jne 0x4049f1
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_send_backup_file_received]
add esp, 4
mov dword [esp + 0x14], 0
test edi, edi
jne 0x4049f1
xorps xmm0, xmm0
movlpd qword [esp + 0x70], xmm0
mov esi, dword [esp + 0x74]
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x70]
movlpd qword [esp + 0xa8], xmm0
mov dword [esp + 0x64], esi
cmp dword [0x40a38c], 0
jle 0x4043b0
push str.Cancelling_DLSendFile
push dword [0x40a384]
call dword [sym.imp.imobiledevice.dll_mobilebackup_send_error]
mov eax, dword [esp + 0x34]
add esp, 8
test eax, eax
je 0x404a20
push eax
call ebx
add esp, 4
push 0x13
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
mov edx, str.Manifest
mov esi, edi
add esp, 4
sub esi, edx
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [edx + esi - 1], cl
test cl, cl
jne 0x404a36
lea ecx, [edi - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404a46
mov eax, dword [str..plist.tmp]
mov dword [ecx], eax
mov eax, dword [0x408420]
mov dword [ecx + 4], eax
mov ax, word [0x408424]
push 0
mov word [ecx + 8], ax
mov al, byte [0x408426]
push edi
push dword [esp + 0x30]
mov byte [ecx + 0xa], al
call fcn.00401080
add esp, 0xc
mov esi, eax
mov dword [esp + 0x2c], esi
push edi
call ebx
add esp, 4
lea eax, [esp + 0xd8]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
jne 0x404aac
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
push dword [esp + 0x30]
push str.Received__d_files_from_device._n
call fcn.004013b0
add esp, 8
cmp dword [0x40a38c], 0
jne 0x404e61
mov esi, dword [esp + 0x10]
push esi
mov dword [esp + 0x3c], 0
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x404b33
lea eax, [esp + 0x38]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_string_val]
mov edi, dword [esp + 0x40]
add esp, 8
mov ecx, str.DLMessageProcessMessage
mov eax, edi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404b20
test dl, dl
je 0x404b1c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404b20
add eax, 2
add ecx, 2
test dl, dl
jne 0x404b00
xor esi, esi
jmp 0x404b25
sbb esi, esi
or esi, 1
push edi
call ebx
add esp, 4
test esi, esi
jne 0x404e61
mov edi, dword [sym.imp.plist.dll_plist_array_get_item]
push 1
push dword [esp + 0x88]
call edi
push str.BackupMessageTypeKey
push eax
mov dword [esp + 0x68], eax
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 0x10
mov dword [esp + 0x10], esi
test esi, esi
je 0x404e61
push esi
mov dword [esp + 0x3c], 0
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x404bcf
lea eax, [esp + 0x38]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_string_val]
mov edi, dword [esp + 0x40]
add esp, 8
mov ecx, str.BackupMessageBackupFinished
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404bb6
test dl, dl
je 0x404bb2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404bb6
add eax, 2
add ecx, 2
test dl, dl
jne 0x404b96
xor esi, esi
jmp 0x404bbb
sbb esi, esi
or esi, 1
push edi
call ebx
add esp, 4
test esi, esi
jne 0x404e61
mov edi, dword [sym.imp.plist.dll_plist_array_get_item]
push str.BackupFilesToDeleteKey
push dword [esp + 0x5c]
call dword [sym.imp.plist.dll_plist_dict_get_item]
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x404d8d
push eax
call dword [sym.imp.plist.dll_plist_array_get_size]
add esp, 4
mov dword [esp + 0x98], eax
xor esi, esi
mov dword [esp + 0x9c], 0
push esi
push dword [esp + 0x14]
call edi
add esp, 8
test eax, eax
je 0x404d8d
nop dword [eax]
lea ecx, [esp + 0x80]
inc esi
push ecx
push eax
mov dword [esp + 0x60], esi
call dword [sym.imp.plist.dll_plist_get_string_val]
mov esi, dword [esp + 0x88]
add esp, 8
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404c43
sub ecx, edx
lea eax, [ecx + 8]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
mov dword [esp + 0x3c], eax
add esp, 4
mov edx, esi
sub edi, esi
mov cl, byte [edx]
lea edx, [edx + 1]
mov byte [edx + edi - 1], cl
test cl, cl
jne 0x404c63
lea ecx, [eax - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404c73
mov eax, dword [str..mddata]
push 0
push dword [esp + 0x3c]
mov dword [ecx], eax
mov eax, dword [0x40762c]
push dword [esp + 0x30]
mov dword [ecx + 4], eax
call fcn.00401080
add esp, 0xc
mov edi, eax
push dword [esp + 0x38]
call ebx
add esp, 4
push edi
push str.Removing___s_
call fcn.004013b0
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 0xc
push edi
test eax, eax
jne 0x404d52
call ebx
mov ecx, esi
add esp, 4
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404cd1
sub ecx, edx
lea eax, [ecx + 8]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
mov edx, edi
sub edx, esi
nop dword [eax]
mov cl, byte [esi]
lea esi, [esi + 1]
mov byte [esi + edx - 1], cl
test cl, cl
jne 0x404cf0
lea ecx, [edi - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404d00
mov eax, dword [str..mdinfo]
push 0
mov dword [ecx], eax
mov eax, dword [0x407644]
push edi
push dword [esp + 0x30]
mov dword [ecx + 4], eax
call fcn.00401080
add esp, 0xc
mov esi, eax
push edi
call ebx
add esp, 4
push esi
push str.and___s_...
call fcn.004013b0
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 0xc
neg eax
sbb edi, edi
inc edi
push esi
call ebx
add esp, 4
jmp 0x404d59
call ebx
add esp, 4
xor edi, edi
test edi, edi
mov ecx, str.DONE_n
mov eax, str.FAILED_n
cmovne eax, ecx
push eax
call fcn.004013b0
mov esi, dword [esp + 0x5c]
add esp, 4
mov edi, dword [sym.imp.plist.dll_plist_array_get_item]
push esi
push dword [esp + 0x14]
call edi
add esp, 8
test eax, eax
jne 0x404c20
push 1
push dword [esp + 0x88]
call edi
push str.BackupManifestKey
push eax
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, dword [esp + 0x3c]
add esp, 0x10
mov dword [esp + 0x54], eax
test eax, eax
je 0x404e44
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
push str.Storing_Manifest.plist..._n
call fcn.004013b0
mov eax, dword [esp + 0x58]
add esp, 4
mov dword [esp + 0x20], 0
test eax, eax
je 0x404e44
test esi, esi
je 0x404e44
lea ecx, [esp + 0x58]
push ecx
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.plist.dll_plist_to_xml]
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov edi, dword [esp + 0x58]
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], eax
push 0x4072bc
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x404e37
push esi
push edi
push 1
push dword [esp + 0x7c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
push dword [esp + 0x20]
call ebx
mov esi, dword [esp + 0x30]
add esp, 4
push str.Backup_Successful._n
call fcn.004013b0
mov ecx, dword [esp + 0x2c]
add esp, 4
mov edx, 1
call fcn.00401910
jmp 0x404e91
push str.Backup_Failed._n
jmp 0x404e85
cmp eax, 0xfffffffa
jne 0x404e74
push str.ERROR:_Could_not_start_backup_process:_backup_protocol_version_mismatch__n
jmp 0x404e85
cmp eax, 0xfffffff9
jne 0x404e80
push str.ERROR:_Could_not_start_backup_process:_device_refused_to_start_the_backup_process._n
jmp 0x404e85
push str.ERROR:_Could_not_start_backup_process:_unspecified_error_occurred_n
call fcn.004013b0
add esp, 4
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x68]
mov eax, ecx
mov edx, dword [esp + 0x6c]
or eax, edx
je 0x404edb
push 0xc
push edx
push ecx
push dword [esp + 0x94]
call dword [sym.imp.imobiledevice.dll_afc_file_lock]
push dword [esp + 0x7c]
push dword [esp + 0x7c]
push dword [esp + 0xa0]
call dword [sym.imp.imobiledevice.dll_afc_file_close]
add esp, 0x1c
xorps xmm0, xmm0
mov ecx, str.com.apple.itunes_mobdev.syncDidFinish
movlpd qword [esp + 0x68], xmm0
call fcn.004023a0
test esi, esi
je 0x404ee5
push esi
call ebx
add esp, 4
mov eax, dword [0x40a390]
test eax, eax
je 0x404f22
push eax
call dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
add esp, 4
jmp 0x404f18
push str.com.apple.mobilebackup
push str.ERROR:_Could_not_start_service__s._n
call fcn.004013b0
push dword [0x40a390]
call dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
add esp, 0xc
mov dword [0x40a390], 0
mov eax, dword [esp + 0x88]
test eax, eax
je 0x404f37
push eax
call dword [sym.imp.imobiledevice.dll_afc_client_free]
add esp, 4
mov eax, dword [esp + 0xb8]
test eax, eax
je 0x404f4c
push eax
call dword [sym.imp.imobiledevice.dll_np_client_free]
add esp, 4
mov eax, dword [0x40a384]
test eax, eax
je 0x404f5f
push eax
call dword [sym.imp.imobiledevice.dll_mobilebackup_client_free]
add esp, 4
push dword [0x40a388]
call dword [sym.imp.imobiledevice.dll_idevice_free]
mov eax, dword [esp + 0xc0]
add esp, 4
test eax, eax
je 0x404f7f
push eax
call ebx
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2150]
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret
push str.No_command_specified._n
call fcn.004013b0
mov edx, dword [esp + 0x18]
add esp, 4
call fcn.00402550
mov ecx, dword [esp + 0x215c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00404fc4
mov esp, ebp
pop ebp
ret