Function at 0x4016c0
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, 0xfffffff8
sub esp, 0x1c4
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x1c0], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_signal]
xor ebx, ebx
push edi
mov dword [esp + 0xc], eax
xor eax, eax
push 0x401080
push 2
mov dword [esp + 0x2c], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], ebx
call esi
push 0x401080
push 0xf
call esi
mov edi, 1
add esp, 0x10
cmp dword [ebp + 8], edi
jle 0x401dbd
mov eax, dword [esp + 0xc]
nop dword [eax]
mov esi, dword [eax + edi*4]
lea eax, [eax + edi*4]
mov dword [esp + 0x18], eax
mov ecx, 0x403664
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401761
test dl, dl
je 0x40175d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401761
add eax, 2
add ecx, 2
test dl, dl
jne 0x401741
xor eax, eax
jmp 0x401766
sbb eax, eax
or eax, 1
test eax, eax
je 0x4019a4
mov ecx, str.__debug
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401795
test dl, dl
je 0x401791
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401795
add eax, 2
add ecx, 2
test dl, dl
jne 0x401775
xor eax, eax
jmp 0x40179a
sbb eax, eax
or eax, 1
test eax, eax
je 0x4019a4
mov ecx, 0x403670
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4017d0
test dl, dl
je 0x4017cc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4017d0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4017b0
xor eax, eax
jmp 0x4017d5
sbb eax, eax
or eax, 1
test eax, eax
je 0x401981
mov ecx, str.__udid
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401804
test dl, dl
je 0x401800
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401804
add eax, 2
add ecx, 2
test dl, dl
jne 0x4017e4
xor eax, eax
jmp 0x401809
sbb eax, eax
or eax, 1
test eax, eax
je 0x401981
mov ecx, 0x40367c
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401838
test dl, dl
je 0x401834
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401838
add eax, 2
add ecx, 2
test dl, dl
jne 0x401818
xor eax, eax
jmp 0x40183d
sbb eax, eax
or eax, 1
test eax, eax
je 0x401976
mov ecx, str.__network
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401870
test dl, dl
je 0x40186c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401870
add eax, 2
add ecx, 2
test dl, dl
jne 0x401850
xor eax, eax
jmp 0x401875
sbb eax, eax
or eax, 1
test eax, eax
je 0x401976
mov ecx, 0x40368c
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4018a4
test dl, dl
je 0x4018a0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4018a4
add eax, 2
add ecx, 2
test dl, dl
jne 0x401884
xor eax, eax
jmp 0x4018a9
sbb eax, eax
or eax, 1
test eax, eax
je 0x401a62
mov ecx, str.__help
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4018d8
test dl, dl
je 0x4018d4
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4018d8
add eax, 2
add ecx, 2
test dl, dl
jne 0x4018b8
xor eax, eax
jmp 0x4018dd
sbb eax, eax
or eax, 1
test eax, eax
je 0x401a62
mov ecx, 0x403698
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401910
test dl, dl
je 0x40190c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401910
add eax, 2
add ecx, 2
test dl, dl
jne 0x4018f0
xor eax, eax
jmp 0x401915
sbb eax, eax
or eax, 1
test eax, eax
je 0x401a34
mov ecx, str.__version
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401944
test dl, dl
je 0x401940
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401944
add eax, 2
add ecx, 2
test dl, dl
jne 0x401924
xor eax, eax
jmp 0x401949
sbb eax, eax
or eax, 1
test eax, eax
je 0x401a34
mov ebx, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
push esi
call ebx
add esp, 4
test eax, eax
jle 0x401a62
mov eax, dword [esp + 0x18]
push dword [eax]
call ebx
movzx ebx, ax
mov dword [esp + 0x24], ebx
jmp 0x4019c0
mov ecx, 1
mov dword [esp + 0x14], ecx
jmp 0x4019c7
mov eax, dword [esp + 0xc]
inc edi
mov esi, dword [eax + edi*4]
mov dword [esp + 0x1c], esi
test esi, esi
je 0x401a82
cmp byte [esi], 0
je 0x401a82
mov ecx, dword [esp + 0x14]
jmp 0x4019cf
push 1
mov dword [0x405380], 1
call dword [sym.imp.imobiledevice.dll_idevice_set_debug_level]
mov dword [0x405388], 3
mov ecx, dword [esp + 0x18]
add esp, 4
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
inc edi
cmp edi, dword [ebp + 8]
jl 0x401730
test bx, bx
je 0x401dbd
xor eax, eax
test ecx, ecx
setne al
lea eax, [eax*2 + 2]
push eax
lea eax, [esp + 0x28]
push esi
push eax
call dword [sym.imp.imobiledevice.dll_idevice_new_with_options]
add esp, 0xc
test eax, eax
je 0x401ac3
test esi, esi
je 0x401aa0
push esi
push str.No_device_found_with_udid__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, 0xc
mov ebx, 1
jmp 0x401de1
push str.1.0.0
push str.idevicedebugserverproxy
push str._s__s_n
call fcn.00401040
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c0]
xor ecx, esp
call fcn.00402056
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0xc]
call fcn.004010a0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c0]
xor ecx, esp
call fcn.00402056
mov esp, ebp
pop ebp
ret
mov edx, eax
call fcn.004010a0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c0]
xor ecx, esp
call fcn.00402056
mov esp, ebp
pop ebp
ret
push str.No_device_found._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
mov ebx, 1
jmp 0x401de1
lea eax, [esp + 0x38]
mov dword [esp + 0x18], 1
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x401b00
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]
push 6
push 1
push 2
mov dword [0x405384], 1
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
test edi, edi
jns 0x401b2f
push str.socket__
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
add esp, 4
jmp 0x401bbc
push 4
lea eax, [esp + 0x1c]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x401b50
push str.setsockopt__
jmp 0x401bac
mov esi, dword [sym.imp.WS2_32.dll_htonl]
xorps xmm0, xmm0
mov eax, 2
movlpd qword [esp + 0x30], xmm0
push 0x7f000001
mov word [esp + 0x2c], ax
call esi
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
lea eax, [esp + 0x28]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x401b99
push str.bind__
jmp 0x401bac
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x401bdf
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]
push str.Could_not_create_socket_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
mov ebx, 1
jmp 0x401de1
cmp dword [0x40537c], 0
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
jne 0x401d0c
cmp dword [0x405380], 0
je 0x401c1d
mov eax, dword [esp + 0x20]
movzx eax, ax
push eax
push str.main
push str._s:_Waiting_for_connection_on_local_port__d_n
push 1
call ebx
add esp, 4
push eax
call fcn.00401010
add esp, 0x10
xorps xmm0, xmm0
mov eax, 2
push 0x7f000001
movlpd qword [esp + 0x34], xmm0
mov word [esp + 0x2c], ax
call esi
push dword [esp + 0x20]
mov dword [esp + 0x30], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x1c], 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esp + 0x14], eax
test eax, eax
js 0x401cff
cmp dword [0x405380], 0
je 0x401c92
push str.main
push str._s:_Handling_new_client_connection..._n
push 1
call ebx
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
push 8
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x401da0
mov eax, dword [esp + 0x10]
mov dword [esi + 4], 0
test eax, eax
je 0x401cbb
mov dword [eax + 4], esi
jmp 0x401cbf
mov dword [esp + 0x10], esi
push 0x14
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
test eax, eax
je 0x401da0
mov ecx, dword [esp + 0x14]
push 0
push 0
push eax
push 0x4015c0
push 0
mov dword [eax], ecx
mov ecx, dword [esp + 0x38]
push 0
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x401d76
mov dword [esi], eax
mov esi, dword [sym.imp.WS2_32.dll_htonl]
cmp dword [0x40537c], 0
je 0x401bf2
cmp dword [0x405380], 0
je 0x401d2f
push str.main
push str._s:_Shutting_down_debugserver_proxy..._n
push 1
call ebx
add esp, 4
push eax
call fcn.00401010
add esp, 0xc
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x401ddf
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
push dword [ecx]
mov esi, ecx
call ebx
mov eax, dword [esp + 0x10]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
push esi
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
call edi
mov ecx, dword [esp + 0x14]
add esp, 4
test ecx, ecx
jne 0x401d47
jmp 0x401ddf
push str.Could_not_start_connection_handler._n
push 2
call ebx
add esp, 4
push eax
call fcn.00401010
add esp, 8
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x401d0c
push str.Out_of_memory_n
push 2
call ebx
add esp, 4
push eax
call fcn.00401010
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push str.Please_specify_a_PORT._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 edx, dword [esp + 0x14]
add esp, 8
call fcn.004010a0
xor ebx, ebx
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x401df3
push ecx
call dword [sym.imp.imobiledevice.dll_idevice_free]
add esp, 4
mov ecx, dword [esp + 0x1cc]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402056
mov esp, ebp
pop ebp
ret