Function at 0x40acf0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x415004]
xor eax, esp
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [esp + 0x2c], eax
mov ebx, edx
mov eax, dword [ebp + 8]
push esi
mov dword [esp + 0x14], eax
or esi, 0xffffffff
mov eax, dword [ebp + 0x10]
push edi
mov dword [esp + 0x30], eax
lea eax, [esp + 0x28]
push ecx
push eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x30], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], esi
call dword [sym.imp.imobiledevice.dll_idevice_new]
mov edi, dword [sym.imp.imobiledevice.dll_lockdownd_client_free]
add esp, 8
test eax, eax
mov dword [esp + 0x20], edi
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [esp + 0x38], eax
je 0x40ad95
push str.No_device_found__is_it_plugged_in__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.004014d0
add esp, 8
jmp 0x40b064
push str.ios_webkit_debug_proxy
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x30]
call dword [sym.imp.imobiledevice.dll_lockdownd_client_new_with_handshake]
add esp, 0xc
test eax, eax
je 0x40adcf
push eax
push str.Could_not_connect_to_lockdownd__error_code__d._Exiting._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.004014d0
add esp, 0xc
jmp 0x40b064
mov edi, dword [sym.imp.imobiledevice.dll_lockdownd_get_value]
test ebx, ebx
mov esi, dword [sym.imp.plist.dll_plist_get_string_val]
mov ebx, dword [sym.imp.plist.dll_plist_free]
je 0x40ae19
lea eax, [esp + 0x10]
push eax
push str.UniqueDeviceID
push 0
push dword [esp + 0x20]
call edi
add esp, 0x10
test eax, eax
jne 0x40ae19
push dword [esp + 0x3c]
push dword [esp + 0x14]
call esi
push dword [esp + 0x18]
call ebx
add esp, 0xc
mov dword [esp + 0x10], 0
cmp dword [esp + 0x18], 0
je 0x40ae54
lea eax, [esp + 0x10]
push eax
push str.DeviceName
push 0
push dword [esp + 0x20]
call edi
add esp, 0x10
test eax, eax
jne 0x40ae54
push dword [esp + 0x18]
push dword [esp + 0x14]
call esi
push dword [esp + 0x18]
call ebx
add esp, 0xc
mov dword [esp + 0x10], 0
cmp dword [esp + 0x34], 0
je 0x40af00
lea eax, [esp + 0x10]
push eax
push str.ProductVersion
push 0
push dword [esp + 0x20]
call edi
add esp, 0x10
test eax, eax
jne 0x40af00
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x14]
call esi
mov eax, dword [esp + 0x20]
add esp, 8
test eax, eax
je 0x40aee7
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x48]
push ecx
push str._d._d._d
push eax
call fcn.0040acc0
add esp, 0x14
cmp eax, 2
jl 0x40aee3
movzx ecx, byte [esp + 0x40]
movzx eax, byte [esp + 0x44]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x48]
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x18]
jmp 0x40aee9
mov eax, dword [esp + 0x18]
xor ecx, ecx
mov edx, dword [esp + 0x34]
push eax
mov dword [edx], ecx
call dword [esp + 0x3c]
add esp, 4
push dword [esp + 0x10]
call ebx
add esp, 4
lea eax, [esp + 0x2c]
push eax
push str.com.apple.webinspector
push dword [esp + 0x1c]
call dword [sym.imp.imobiledevice.dll_lockdownd_start_service]
add esp, 0xc
test eax, eax
jne 0x40b04f
mov eax, dword [esp + 0x2c]
movzx eax, word [eax]
test ax, ax
je 0x40b04f
lea ecx, [esp + 0x1c]
push ecx
push eax
push dword [esp + 0x30]
call dword [sym.imp.imobiledevice.dll_idevice_connect]
add esp, 0xc
test eax, eax
je 0x40af50
push str.idevice_connect_failed_
jmp 0x40b054
mov eax, dword [esp + 0x2c]
cmp byte [eax + 2], 1
jne 0x40afca
mov edi, dword [esp + 0x30]
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
test edi, edi
je 0x40afbe
push dword [esp + 0x1c]
call dword [sym.imp.imobiledevice.dll_idevice_connection_enable_ssl]
add esp, 4
test eax, eax
jne 0x40afbe
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40afbe
cmp dword [eax + 4], 1
jne 0x40afb4
cmp dword [eax + 8], 0
jbe 0x40afb4
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x40af9e
mov ecx, dword [ecx]
test ecx, ecx
je 0x40af9e
mov dword [edi], ecx
jmp 0x40afce
push str.Invalid_ssl_data_struct._Make_sure_libimobiledevice_was_compiled_with_openssl._Otherwise_please_verify_that_D:_a1_sios_webkit_debug_proxy_srcwebinspector.cs_ssl_data_matches_your_version_of_libimbiledevice_src_idevice.h
call esi
add esp, 4
push str.ssl_connection_failed_
call esi
jmp 0x40b05a
push str.Invalid_idevice_connection_struct._Please_verify_that_D:_a1_sios_webkit_debug_proxy_srcwebinspector.cs_idevice_connection_private_matches_your_version_of_libimbiledevice_src_idevice.h
call esi
add esp, 4
push str.ssl_connection_failed_
call esi
jmp 0x40b05a
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
test ecx, ecx
je 0x40afec
push ecx
call edi
mov eax, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x14], 0
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [sym.imp.imobiledevice.dll_idevice_connection_get_fd]
add esp, 8
test eax, eax
je 0x40b00c
push str.Unable_to_get_connection_file_descriptor.
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x40b05e
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 1
push eax
push 0x8004667e
push dword [esp + 0x2c]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x40b045
push str.webinspector:_could_not_set_socket_to_non_blocking
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.004014d0
add esp, 8
mov esi, dword [esp + 0x24]
test esi, esi
jns 0x40b074
jmp 0x40b064
push str.Could_not_start_com.apple.webinspector_
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov edi, dword [esp + 0x24]
add esp, 4
or esi, 0xffffffff
mov eax, dword [esp + 0x24]
cmp eax, 0xffffffff
je 0x40b074
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [esp + 0x1c]
call dword [esp + 0x3c]
add esp, 4
push dword [esp + 0x14]
call edi
add esp, 4
push dword [esp + 0x28]
call dword [sym.imp.imobiledevice.dll_idevice_free]
mov ecx, dword [esp + 0x50]
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040d125
mov esp, ebp
pop ebp
ret