Function at 0x401e40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x294
mov eax, dword [0x406004]
xor eax, esp
mov dword [esp + 0x290], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor eax, eax
push edi
xor edi, edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
xor ebx, ebx
xor ecx, ecx
mov dword [esp + 0x2c], 0
mov edi, 1
mov dword [esp + 0x3c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ecx
cmp dword [ebp + 8], edi
jle 0x402f4e
mov esi, dword [esi + edi*4]
mov ecx, 0x404b14
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401ee0
test dl, dl
je 0x401edc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401ee0
add eax, 2
add ecx, 2
test dl, dl
jne 0x401ec0
xor eax, eax
jmp 0x401ee5
sbb eax, eax
or eax, 1
test eax, eax
je 0x4022f4
mov ecx, str.__debug
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401f14
test dl, dl
je 0x401f10
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401f14
add eax, 2
add ecx, 2
test dl, dl
jne 0x401ef4
xor eax, eax
jmp 0x401f19
sbb eax, eax
or eax, 1
test eax, eax
je 0x4022f4
mov ecx, 0x404b20
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401f48
test dl, dl
je 0x401f44
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401f48
add eax, 2
add ecx, 2
test dl, dl
jne 0x401f28
xor eax, eax
jmp 0x401f4d
sbb eax, eax
or eax, 1
test eax, eax
je 0x4022d1
mov ecx, str.__udid
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401f80
test dl, dl
je 0x401f7c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401f80
add eax, 2
add ecx, 2
test dl, dl
jne 0x401f60
xor eax, eax
jmp 0x401f85
sbb eax, eax
or eax, 1
test eax, eax
je 0x4022d1
mov ecx, 0x404b2c
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401fb4
test dl, dl
je 0x401fb0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401fb4
add eax, 2
add ecx, 2
test dl, dl
jne 0x401f94
xor eax, eax
jmp 0x401fb9
sbb eax, eax
or eax, 1
test eax, eax
je 0x4022c7
mov ecx, str.__network
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401fe8
test dl, dl
je 0x401fe4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401fe8
add eax, 2
add ecx, 2
test dl, dl
jne 0x401fc8
xor eax, eax
jmp 0x401fed
sbb eax, eax
or eax, 1
test eax, eax
je 0x4022c7
mov ecx, str.install
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402020
test dl, dl
je 0x40201c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402020
add eax, 2
add ecx, 2
test dl, dl
jne 0x402000
xor eax, eax
jmp 0x402025
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40205f
mov esi, dword [esp + 0x10]
inc edi
mov ebx, dword [esi + edi*4]
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x402f4e
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402042
sub ecx, edx
cmp ecx, 1
jb 0x402f4e
xor eax, eax
mov dword [esp + 0x14], eax
jmp 0x402307
mov ecx, str.list
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402086
test dl, dl
je 0x402082
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402086
add eax, 2
add ecx, 2
test dl, dl
jne 0x402066
xor eax, eax
jmp 0x40208b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40209d
mov eax, 1
mov dword [esp + 0x14], eax
jmp 0x402303
mov ecx, str.copy
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4020c4
test dl, dl
je 0x4020c0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4020c4
add eax, 2
add ecx, 2
test dl, dl
jne 0x4020a4
xor eax, eax
jmp 0x4020c9
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402133
mov esi, dword [esp + 0x10]
mov ebx, dword [esi + edi*4 + 4]
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x402f4e
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4020e6
sub ecx, edx
cmp ecx, 1
jb 0x402f4e
mov eax, 2
add edi, eax
mov dword [esp + 0x14], eax
mov edx, dword [esi + edi*4]
test edx, edx
je 0x402307
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402113
mov eax, dword [esp + 0x14]
sub ecx, esi
mov esi, dword [esp + 0x10]
je 0x402307
mov dword [esp + 0x18], edx
jmp 0x40230b
mov ecx, str.remove
mov eax, esi
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402160
test dl, dl
je 0x40215c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402160
add eax, 2
add ecx, 2
test dl, dl
jne 0x402140
xor eax, eax
jmp 0x402165
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4021a2
mov esi, dword [esp + 0x10]
inc edi
mov ebx, dword [esi + edi*4]
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x402f4e
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402182
sub ecx, edx
cmp ecx, 1
jb 0x402f4e
mov eax, 3
mov dword [esp + 0x14], eax
jmp 0x402307
mov ecx, str.remove_all
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4021d0
test dl, dl
je 0x4021cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4021d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4021b0
xor eax, eax
jmp 0x4021d5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4021e8
mov eax, 3
inc edi
mov dword [esp + 0x14], eax
jmp 0x402303
mov ecx, str.dump
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402210
test dl, dl
je 0x40220c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402210
add eax, 2
add ecx, 2
test dl, dl
jne 0x4021f0
xor eax, eax
jmp 0x402215
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402252
mov esi, dword [esp + 0x10]
inc edi
mov ebx, dword [esi + edi*4]
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x402f4e
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402232
sub ecx, edx
cmp ecx, 1
jb 0x402f4e
mov eax, 4
mov dword [esp + 0x14], eax
jmp 0x402307
mov ecx, 0x404b70
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402280
test dl, dl
je 0x40227c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402280
add eax, 2
add ecx, 2
test dl, dl
jne 0x402260
xor eax, eax
jmp 0x402285
sbb eax, eax
or eax, 1
test eax, eax
je 0x4022bd
mov ecx, str.__xml
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4022b0
test dl, dl
je 0x4022ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4022b0
add eax, 2
add ecx, 2
test dl, dl
jne 0x402290
xor eax, eax
jmp 0x4022b5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402409
mov dword [esp + 0x24], 1
jmp 0x4022ff
mov dword [esp + 0x28], 1
jmp 0x4022ff
mov esi, dword [esp + 0x10]
inc edi
mov edx, dword [esi + edi*4]
mov dword [esp + 0xc], edx
test edx, edx
je 0x402f4e
cmp byte [edx], 0
je 0x402f4e
mov eax, dword [esp + 0x14]
jmp 0x402307
push 1
call dword [sym.imp.imobiledevice.dll_idevice_set_debug_level]
add esp, 4
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
inc edi
cmp edi, dword [ebp + 8]
jl 0x401eb6
cmp eax, 0xffffffff
je 0x402f4e
cmp eax, 5
jge 0x402f4e
cmp eax, 4
jne 0x402628
lea eax, [esp + 0x28]
mov dword [esp + 0xc], 0
push eax
lea edx, [esp + 0x10]
mov dword [esp + 0x2c], 0
mov ecx, ebx
call fcn.00401cd0
add esp, 4
test eax, eax
jne 0x4026e8
mov edi, dword [esp + 0xc]
push eax
push dword [esp + 0x2c]
push edi
call dword [sym.imp.plist.dll_plist_new_data]
add esp, 0xc
mov esi, eax
mov ecx, esi
call fcn.00401920
push esi
mov ebx, eax
call dword [sym.imp.plist.dll_plist_free]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push edi
call esi
add esp, 4
test ebx, ebx
je 0x4025ec
cmp dword [esp + 0x24], 0
je 0x402502
lea eax, [esp + 0x40]
mov dword [esp + 0xc], 0
push eax
lea eax, [esp + 0x10]
mov dword [esp + 0x44], 0
push eax
push ebx
call dword [sym.imp.plist.dll_plist_to_xml]
mov eax, dword [esp + 0x18]
add esp, 0xc
test eax, eax
je 0x402605
push eax
push 0x40420c
call fcn.00401660
push dword [esp + 0x14]
call esi
add esp, 0xc
push ebx
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x38]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
mov ecx, 0x404b7c
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402430
test dl, dl
je 0x40242c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402430
add eax, 2
add ecx, 2
test dl, dl
jne 0x402410
xor eax, eax
jmp 0x402435
sbb eax, eax
or eax, 1
test eax, eax
je 0x4024cb
mov ecx, str.__help
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402464
test dl, dl
je 0x402460
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402464
add eax, 2
add ecx, 2
test dl, dl
jne 0x402444
xor eax, eax
jmp 0x402469
sbb eax, eax
or eax, 1
test eax, eax
je 0x4024cb
mov ecx, 0x404b88
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402494
test dl, dl
je 0x402490
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402494
add eax, 2
add ecx, 2
test dl, dl
jne 0x402474
xor eax, eax
jmp 0x402499
sbb eax, eax
or eax, 1
test eax, eax
je 0x4024d4
mov eax, str.__version
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x4024c2
test cl, cl
je 0x4024be
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x4024c2
add esi, 2
add eax, 2
test cl, cl
jne 0x4024a2
xor eax, eax
jmp 0x4024c7
sbb eax, eax
or eax, 1
test eax, eax
je 0x4024d4
mov edx, dword [esp + 0x10]
jmp 0x402f50
push str.1.0.0
push str.ideviceprovision
push str._s__s_n
call fcn.00401660
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.plist.dll_plist_get_node_type]
push ebx
call edi
add esp, 4
cmp eax, 5
jne 0x4025cc
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov esi, eax
mov dword [esp + 0x10], 0
add esp, 4
test esi, esi
je 0x402605
push ebx
call edi
add esp, 4
lea edx, [esp + 0xc]
mov ecx, ebx
push esi
sub eax, 4
je 0x4025a1
sub eax, 1
je 0x402576
call fcn.00401210
add esp, 4
push ebx
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x38]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
call fcn.00401100
add esp, 4
push ebx
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x38]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
call fcn.00401080
add esp, 4
push ebx
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x38]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
push str.ERROR:_unexpected_node_type_in_profile_plist__not_PLIST_DICT__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
mov dword [esp + 0x3c], 0xffffffff
jmp 0x402602
push str.ERROR:_could_not_extract_embedded_plist_from_profile__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, 8
push ebx
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x38]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x402689
test edx, edx
lea eax, [esp + 0x68]
mov esi, ebx
cmovne esi, edx
push eax
push esi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
js 0x402657
mov eax, dword [esp + 0x6e]
and eax, 0xf000
cmp eax, 0x4000
je 0x402689
push esi
push str.ERROR:__s_does_not_exist_or_is_not_a_directory__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
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0xc]
xor eax, eax
cmp dword [esp + 0x28], eax
setne al
lea eax, [eax*2 + 2]
push eax
lea eax, [esp + 0x34]
push edi
push eax
call dword [sym.imp.imobiledevice.dll_idevice_new_with_options]
add esp, 0xc
test eax, eax
je 0x402700
test edi, edi
je 0x4026db
push edi
push str.No_device_found_with_udid__s._n
call fcn.00401660
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
push str.No_device_found._n
call fcn.00401660
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
push str.ideviceprovision
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x38]
call dword [sym.imp.imobiledevice.dll_lockdownd_client_new_with_handshake]
add esp, 0xc
test eax, eax
je 0x40275a
push eax
push str.ERROR:_Could_not_connect_to_lockdownd__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 + 0x30]
call dword [sym.imp.imobiledevice.dll_idevice_free]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0
push eax
push str.ProductVersion
push 0
push dword [esp + 0x38]
mov dword [esp + 0x54], 0
call dword [sym.imp.imobiledevice.dll_lockdownd_get_value]
mov eax, dword [esp + 0x48]
add esp, 0x10
mov ebx, dword [sym.imp.plist.dll_plist_get_node_type]
test eax, eax
je 0x4027b2
push eax
call ebx
add esp, 4
cmp eax, 3
jne 0x4027ae
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x3c]
call dword [sym.imp.plist.dll_plist_get_string_val]
add esp, 8
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.plist.dll_plist_free]
mov eax, dword [esp + 0x48]
add esp, 4
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
test eax, eax
je 0x402f29
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x50]
push ecx
push str._d._d._d
push eax
call fcn.004016a0
add esp, 0x14
push dword [esp + 0x44]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x4c]
add esp, 4
test eax, eax
je 0x402f29
movzx esi, al
movzx eax, byte [esp + 0x4c]
shl esi, 8
or esi, eax
movzx eax, byte [esp + 0x50]
shl esi, 8
or esi, eax
lea eax, [esp + 0x3c]
push eax
push str.com.apple.misagent
push dword [esp + 0x34]
call dword [sym.imp.imobiledevice.dll_lockdownd_start_service]
add esp, 0xc
test eax, eax
je 0x40286d
push str.Could_not_start_service__com.apple.misagent__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 + 0x34]
call dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
jmp 0x402732
push dword [esp + 0x2c]
mov edi, dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
call edi
add esp, 4
mov dword [esp + 0x2c], 0
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0
push eax
push dword [esp + 0x40]
push dword [esp + 0x38]
call dword [sym.imp.imobiledevice.dll_misagent_client_new]
add esp, 0xc
test eax, eax
je 0x4028df
push str.Could_not_connect_to__com.apple.misagent__on_device_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
mov eax, dword [esp + 0x44]
add esp, 8
test eax, eax
je 0x4028d1
push eax
call dword [sym.imp.imobiledevice.dll_lockdownd_service_descriptor_free]
add esp, 4
push dword [esp + 0x2c]
call edi
add esp, 4
jmp 0x402735
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4028f1
push eax
call dword [sym.imp.imobiledevice.dll_lockdownd_service_descriptor_free]
add esp, 4
mov edi, dword [esp + 0x14]
cmp edi, 3
ja case.default.0x4028fe
jmp dword [edi*4 + 0x402f6c]
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
lea edx, [esp + 0x10]
mov dword [esp + 0x10], 0
mov ecx, ebx
mov dword [esp + 0x2c], 0
call fcn.00401cd0
add esp, 4
test eax, eax
jne case.default.0x4028fe
mov edi, dword [esp + 0xc]
push eax
push dword [esp + 0x2c]
push edi
call dword [sym.imp.plist.dll_plist_new_data]
add esp, 0xc
mov esi, eax
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push esi
push dword [esp + 0x24]
call dword [sym.imp.imobiledevice.dll_misagent_install]
add esp, 8
test eax, eax
jne 0x402978
push ebx
push str.Profile__s_installed_successfully._n
call fcn.00401660
add esp, 8
jmp case.default.0x4028fe
push dword [esp + 0x20]
call dword [sym.imp.imobiledevice.dll_misagent_get_status_code]
add esp, 4
push eax
push ebx
push str.Could_not_install_profile__s__status_code:_0x_x_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, 0x10
jmp case.default.0x4028fe
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x24]
cmp esi, 0x90300
jae 0x4029c6
call dword [sym.imp.imobiledevice.dll_misagent_copy]
jmp 0x4029cc
call dword [sym.imp.imobiledevice.dll_misagent_copy_all]
add esp, 8
test eax, eax
jne 0x402c81
push dword [esp + 0x10]
xor esi, esi
mov dword [esp + 0x5c], esi
call dword [sym.imp.plist.dll_plist_array_get_size]
add esp, 4
mov edx, eax
mov dword [esp + 0x40], edx
cmp edi, 1
je 0x4029fb
cmp dword [esp + 0x18], esi
jne 0x402a1e
cmp edx, 1
mov eax, str.profiles
mov ecx, str.profile
cmovne ecx, eax
push ecx
push edx
push str.Device_has__d_provisioning__s_installed:_n
call fcn.00401660
mov edx, dword [esp + 0x4c]
add esp, 0xc
xor eax, eax
mov dword [esp + 0x28], eax
cmp eax, edx
jae 0x402c6a
push eax
push dword [esp + 0x14]
mov dword [esp + 0x14], 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.plist.dll_plist_array_get_item]
add esp, 8
mov dword [esp + 0x5c], eax
mov ecx, eax
call fcn.00401920
mov edi, eax
test edi, edi
je 0x402ac4
push edi
call ebx
add esp, 4
cmp eax, 5
jne 0x402ac4
push str.Name
push edi
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x402a95
push esi
call ebx
add esp, 4
cmp eax, 3
jne 0x402a95
lea eax, [esp + 0xc]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_string_val]
add esp, 8
push str.UUID
push edi
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x402ac4
push esi
call ebx
add esp, 4
cmp eax, 3
jne 0x402ac4
lea eax, [esp + 0x24]
push eax
push esi
call dword [sym.imp.plist.dll_plist_get_string_val]
add esp, 8
cmp dword [esp + 0x18], 0
mov esi, dword [esp + 0x24]
je 0x402b19
test esi, esi
je 0x402b13
mov edi, dword [esp + 0x1c]
mov eax, esi
mov ecx, edi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402b00
test dl, dl
je 0x402afc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402b00
add eax, 2
add ecx, 2
test dl, dl
jne 0x402ae0
xor eax, eax
jmp 0x402b05
sbb eax, eax
or eax, 1
test eax, eax
jne 0x402b13
mov dword [esp + 0x58], 1
jmp 0x402b1d
push esi
jmp 0x402c3d
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
mov ecx, str._no_name_
test eax, eax
cmovne ecx, eax
test esi, esi
push ecx
mov eax, str._unknown_id_
cmovne eax, esi
push eax
push str._s____s_n
call fcn.00401660
add esp, 0xc
cmp dword [esp + 0x14], 2
jne 0x402c39
mov eax, dword [esp + 0x24]
test eax, eax
je 0x402b6b
push eax
mov eax, edi
mov edi, dword [esp + 0x1c]
test edi, edi
cmovne eax, edi
push eax
push str._s__s.mobileprovision
jmp 0x402b80
mov ecx, dword [esp + 0x18]
mov eax, edi
push dword [esp + 0x28]
test ecx, ecx
cmovne eax, ecx
push eax
push str._s_profile_d.mobileprovision
lea eax, [esp + 0xa4]
push eax
call fcn.00401040
add esp, 0x10
lea eax, [esp + 0x98]
push 0x4041dc
push 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 0x402c06
lea eax, [esp + 0x60]
mov dword [esp + 0x54], 0
push eax
lea eax, [esp + 0x58]
xorps xmm0, xmm0
push eax
push dword [esp + 0x64]
movlpd qword [esp + 0x6c], xmm0
call dword [sym.imp.plist.dll_plist_get_data_val]
add esp, 0xc
push esi
push dword [esp + 0x64]
push 1
push dword [esp + 0x60]
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
lea eax, [esp + 0x98]
push eax
push str.____s_n
call fcn.00401660
add esp, 8
jmp 0x402c39
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
lea eax, [esp + 0x9c]
push eax
push str.Could_not_open__s_for_writing:__s_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, 0x10
push dword [esp + 0x24]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
push dword [esp + 0xc]
call esi
mov eax, dword [esp + 0x2c]
add esp, 4
mov esi, dword [esp + 0x58]
inc eax
mov edx, dword [esp + 0x40]
mov dword [esp + 0x28], eax
test esi, esi
je 0x402a24
cmp dword [esp + 0x18], 0
je 0x402cb0
test esi, esi
jne 0x402cb0
mov ebx, dword [esp + 0x1c]
push ebx
push str.Profile__s_was_not_found_on_the_device._n
jmp 0x402c94
push dword [esp + 0x20]
call dword [sym.imp.imobiledevice.dll_misagent_get_status_code]
add esp, 4
push eax
push str.Could_not_get_installed_profiles_from_device__status_code:_0x_x_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
mov dword [esp + 0x40], 0xffffffff
add esp, 0xc
push dword [esp + 0x10]
jmp 0x402eec
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x402d13
push ebx
push dword [esp + 0x24]
call dword [sym.imp.imobiledevice.dll_misagent_remove]
add esp, 8
test eax, eax
jne 0x402ce6
push ebx
push str.Profile__s_removed._n
call fcn.00401660
add esp, 8
jmp case.default.0x4028fe
push dword [esp + 0x20]
call dword [sym.imp.imobiledevice.dll_misagent_get_status_code]
add esp, 4
push eax
push ebx
push str.Could_not_remove_profile__s__status_code_0x_x_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, 0x10
jmp case.default.0x4028fe
mov dword [esp + 0x1c], 0
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x24]
cmp esi, 0x90300
jae 0x402d34
call dword [sym.imp.imobiledevice.dll_misagent_copy]
jmp 0x402d3a
call dword [sym.imp.imobiledevice.dll_misagent_copy_all]
add esp, 8
test eax, eax
jne 0x402eb9
push dword [esp + 0x1c]
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x10], edi
call dword [sym.imp.plist.dll_plist_array_get_size]
add esp, 4
test eax, eax
je 0x402ea9
push ebx
push dword [esp + 0x20]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], 0
call dword [sym.imp.plist.dll_plist_array_get_item]
add esp, 8
mov ecx, eax
call fcn.00401920
mov esi, eax
test esi, esi
je 0x402e0c
push esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 5
jne 0x402e0c
push str.Name
push esi
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov edi, eax
add esp, 8
test edi, edi
je 0x402dd3
push edi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x402dd3
lea eax, [esp + 0x24]
push eax
push edi
mov edi, dword [sym.imp.plist.dll_plist_get_string_val]
call edi
add esp, 8
jmp 0x402dd9
mov edi, dword [sym.imp.plist.dll_plist_get_string_val]
push str.UUID
push esi
call dword [sym.imp.plist.dll_plist_dict_get_item]
mov esi, eax
add esp, 8
test esi, esi
je 0x402e08
push esi
call dword [sym.imp.plist.dll_plist_get_node_type]
add esp, 4
cmp eax, 3
jne 0x402e08
lea eax, [esp + 0x14]
push eax
push esi
call edi
add esp, 8
mov edi, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x402e7b
push eax
push dword [esp + 0x24]
call dword [sym.imp.imobiledevice.dll_misagent_remove]
add esp, 8
test eax, eax
jne 0x402e4d
mov eax, dword [esp + 0x24]
mov ecx, str._no_name_
test eax, eax
cmovne ecx, eax
push ecx
push dword [esp + 0x18]
push str.OK_profile_removed:__s____s_n
call fcn.00401660
add esp, 0xc
inc edi
mov dword [esp + 0xc], edi
jmp 0x402e7b
push dword [esp + 0x20]
call dword [sym.imp.imobiledevice.dll_misagent_get_status_code]
add esp, 4
mov ecx, str._no_name_
push eax
mov eax, dword [esp + 0x28]
test eax, eax
cmovne ecx, eax
push ecx
push dword [esp + 0x1c]
push str.FAIL_profile_not_removed:__s____s__status_code_0x_x__n
call fcn.00401660
add esp, 0x10
push dword [esp + 0x24]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
push dword [esp + 0x14]
call esi
add esp, 4
inc ebx
push dword [esp + 0x1c]
call dword [sym.imp.plist.dll_plist_array_get_size]
add esp, 4
cmp ebx, eax
jb 0x402d62
push edi
push str._d_profiles_removed._n
call fcn.00401660
add esp, 8
jmp 0x402ee8
push dword [esp + 0x20]
call dword [sym.imp.imobiledevice.dll_misagent_get_status_code]
add esp, 4
push eax
push str.Could_not_get_installed_profiles_from_device__status_code:_0x_x_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
mov dword [esp + 0x34], 0xffffffff
push dword [esp + 0x1c]
mov eax, dword [sym.imp.plist.dll_plist_free]
call eax
add esp, 4
push dword [esp + 0x20]
call dword [sym.imp.imobiledevice.dll_misagent_client_free]
add esp, 4
push dword [esp + 0x30]
call dword [sym.imp.imobiledevice.dll_idevice_free]
mov eax, dword [esp + 0x38]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret
push str.ERROR:_Could_not_determine_the_devices_ProductVersion_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 + 0x34]
call dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
jmp 0x402732
mov edx, esi
call fcn.004016d0
mov ecx, dword [esp + 0x29c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402f7c
mov esp, ebp
pop ebp
ret