Function at 0x401eea
Capabilities:
Create tcp socket
Create thread
Initialize winsock library
Set socket configuration
Start tcp server
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x218
mov eax, dword [0x406004]
xor eax, esp
mov dword [esp + 0x214], eax
movaps xmm0, xmmword [0x404880]
lea eax, [esp + 0x1b0]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 0
push eax
push str.dhu:lnm
push edi
push esi
mov dword [esp + 0x1cc], str.debug
mov dword [esp + 0x1d0], 0
mov dword [esp + 0x1d4], 0
mov dword [esp + 0x1d8], 0x64
mov dword [esp + 0x1dc], str.help
mov dword [esp + 0x1e0], 0
mov dword [esp + 0x1e4], 0
mov dword [esp + 0x1e8], 0x68
mov dword [esp + 0x1ec], str.udid
mov dword [esp + 0x1f0], 1
mov dword [esp + 0x1f4], 0
mov dword [esp + 0x1f8], 0x75
mov dword [esp + 0x1fc], str.local
mov dword [esp + 0x200], 0
mov dword [esp + 0x204], 0
mov dword [esp + 0x208], 0x6c
mov dword [esp + 0x20c], str.network
movups xmmword [esp + 0x210], xmm0
mov dword [esp + 0x220], 0
mov dword [esp + 0x224], 0
mov dword [esp + 0x228], 0
call dword [sym.imp.getopt.dll_getopt_long_a]
add esp, 0x14
cmp eax, 0xffffffff
je 0x401f67
add eax, 0xffffff9c
cmp eax, 0x11
ja case.0x401ee3.101
movzx eax, byte [eax + 0x402444]
jmp dword [eax*4 + 0x40242c]
mov eax, dword [0x406390]
inc eax
push eax
mov dword [0x406390], eax
call dword [sym.imp.usbmuxd.dll_libusbmuxd_set_debug_level]
add esp, 4
jmp 0x401f44
mov eax, dword [sym.imp.getopt.dll_optarg_a]
mov eax, dword [eax]
cmp byte [eax], 0
je 0x401fb5
push dword [0x40638c]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [sym.imp.getopt.dll_optarg_a]
push dword [eax]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 8
mov dword [0x40638c], eax
jmp 0x401f44
or dword [0x406394], 2
jmp 0x401f44
or dword [0x406394], 4
push 0
lea eax, [esp + 0x1bc]
push eax
push str.dhu:lnm
push edi
push esi
call dword [sym.imp.getopt.dll_getopt_long_a]
add esp, 0x14
cmp eax, 0xffffffff
jne 0x401ed0
mov eax, dword [0x406394]
mov ecx, 2
test eax, eax
cmove eax, ecx
mov dword [0x406394], eax
mov eax, dword [sym.imp.getopt.dll_optind]
mov eax, dword [eax]
sub esi, eax
lea ecx, [eax*4]
add edi, ecx
cmp esi, 2
jge 0x4020df
sub edi, ecx
push 0x2f
push dword [edi]
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x4020a2
lea edi, [eax + 1]
jmp 0x4020a4
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push str.ERROR:_UDID_must_not_be_empty__n
push 2
call esi
add esp, 4
push eax
call fcn.00401010
push 0x2f
push dword [edi]
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 0x10
test eax, eax
je 0x401fe3
lea edi, [eax + 1]
jmp 0x401fe5
mov edi, dword [edi]
push 2
call esi
push edi
push str.Usage:__s__OPTIONS__LOCAL_PORT_DEVICE_PORT_n
push eax
call fcn.00401010
push 2
call esi
push str.Proxy_that_enables_TCP_service_access_to_iOS_devices._n_n___u____udid_UDID____target_specific_device_by_UDID_n___n____network______connect_to_network_device_n___l____local________connect_to_USB_device__default__n___h____help_________prints_usage_information_n___d____debug________increase_debug_level_n_nHomepage:__https:__github.com_libimobiledevice_win32_libimobiledevice_vs___nBug_reports:__https:__github.com_libimobiledevice_win32_libimobiledevice_vs___n_n
push eax
call fcn.00401010
add esp, 0x1c
mov eax, 2
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00402456
mov esp, ebp
pop ebp
ret
push 0x2f
push dword [edi]
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x402036
lea edi, [eax + 1]
jmp 0x402038
mov edi, dword [edi]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 1
call esi
push edi
push str.Usage:__s__OPTIONS__LOCAL_PORT_DEVICE_PORT_n
push eax
call fcn.00401010
push 1
call esi
push str.Proxy_that_enables_TCP_service_access_to_iOS_devices._n_n___u____udid_UDID____target_specific_device_by_UDID_n___n____network______connect_to_network_device_n___l____local________connect_to_USB_device__default__n___h____help_________prints_usage_information_n___d____debug________increase_debug_level_n_nHomepage:__https:__github.com_libimobiledevice_win32_libimobiledevice_vs___nBug_reports:__https:__github.com_libimobiledevice_win32_libimobiledevice_vs___n_n
push eax
call fcn.00401010
add esp, 0x1c
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00402456
mov esp, ebp
pop ebp
ret
push 0x2f
push dword [edi]
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x402095
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea edi, [eax + 1]
jmp 0x401fe5
mov edi, dword [edi]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jmp 0x401fe5
mov edi, dword [edi]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
push 2
call esi
push edi
push str.Usage:__s__OPTIONS__LOCAL_PORT_DEVICE_PORT_n
push eax
call fcn.00401010
push 2
call esi
push str.Proxy_that_enables_TCP_service_access_to_iOS_devices._n_n___u____udid_UDID____target_specific_device_by_UDID_n___n____network______connect_to_network_device_n___l____local________connect_to_USB_device__default__n___h____help_________prints_usage_information_n___d____debug________increase_debug_level_n_nHomepage:__https:__github.com_libimobiledevice_win32_libimobiledevice_vs___nBug_reports:__https:__github.com_libimobiledevice_win32_libimobiledevice_vs___n_n
push eax
call fcn.00401010
push dword [0x40638c]
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ecx
add esp, 0x20
jmp 0x402007
push dword [edi]
mov esi, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
call esi
push dword [edi + 4]
mov word [0x406384], ax
call esi
mov cx, word [0x406384]
add esp, 8
movzx eax, ax
mov word [0x406388], ax
test cx, cx
jne 0x40214c
push str.Invalid_listen_port_specified__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 [0x40638c]
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ecx
add esp, 0xc
mov eax, 0xffffffea
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00402456
mov esp, ebp
pop ebp
ret
test ax, ax
jne 0x402158
push str.Invalid_device_port_specified__n
jmp 0x402111
cmp dword [0x406380], 0
movzx esi, cx
mov dword [esp + 0xc], 1
jne 0x4021ab
lea eax, [esp + 0x28]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4021a1
push str.WSAStartup_failed__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 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [0x406380], 1
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
test edi, edi
jns 0x4021d0
push str.socket__
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
add esp, 4
jmp 0x40225b
push 4
lea eax, [esp + 0x10]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x4021f1
push str.setsockopt__
jmp 0x40224b
xorps xmm0, xmm0
mov eax, 2
push 0x7f000001
movlpd qword [esp + 0x1c], xmm0
mov word [esp + 0x14], ax
call dword [sym.imp.WS2_32.dll_htonl]
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0x10]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x402238
push str.bind__
jmp 0x40224b
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x4022b0
push str.listen__
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
add esp, 4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call esi
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push str.Error_creating_socket:__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
push dword [0x40638c]
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ecx
add esp, 0x10
call esi
mov eax, dword [eax]
neg eax
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00402456
mov esp, ebp
pop ebp
ret
push str.waiting_for_connection_n
call fcn.00401670
movzx esi, word [0x406384]
add esp, 4
xorps xmm0, xmm0
mov eax, 2
movlpd qword [esp + 0x18], xmm0
mov word [esp + 0x10], ax
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
test esi, esi
je 0x4023b4
push esi
push str.accepted_connection__fd___d_n
call fcn.00401670
push 0x10
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 0xc
test eax, eax
je 0x4023e7
push 0
push 0
push eax
push 0x401a20
push 0
push 0
mov dword [eax], esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.waiting_for_connection_n
call fcn.00401670
movzx esi, word [0x406384]
add esp, 4
xorps xmm0, xmm0
mov eax, 2
movaps xmmword [esp + 0x10], xmm0
mov word [esp + 0x10], ax
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
test esi, esi
jne 0x402315
push esi
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
call esi
push edi
call esi
push dword [0x40638c]
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ecx
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.00402456
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
push str.ERROR:_Out_of_memory_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 [0x40638c]
mov ecx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call ecx
mov ecx, dword [esp + 0x228]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
xor ecx, esp
call fcn.00402456
mov esp, ebp
pop ebp
ret