Function at 0x414a00
Capabilities:
Create tcp socket
Create udp socket
Get hostname
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x51df40]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0
push 1
push 2
mov dword [ebp - 0x130], 0x10
mov dword [ebp - 0x118], str.txtvers1
mov dword [ebp - 0x114], str.Ver131075
mov dword [ebp - 0x110], str.DbId63B5E5C0C201542E
mov dword [ebp - 0x10c], str.OSsi0x1F5
mov dword [ebp - 0x108], 0
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x520420], eax
test eax, eax
jns 0x414aa4
mov eax, dword [0x51c9d0]
cmp dword [eax], 1
jl 0x414d20
push 0
push 0x347
push str.StartActiveRemote
call fcn.004048f0
push eax
push str._s__s:_d_Cannot_create_ActiveRemote_socket_n
call fcn.004048b0
add esp, 0x14
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov eax, 2
mov dword [ebp - 0x124], esi
mov word [ebp - 0x128], ax
xorps xmm0, xmm0
mov ax, word [0x5240a0]
movlpd qword [ebp - 0x120], xmm0
push edi
movzx edi, ax
test ax, ax
jne 0x414ad5
mov edi, 1
push ebx
xor ebx, ebx
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov dword [ebp - 0x12c], eax
cdq
idiv edi
add dx, word [0x5240a2]
movzx ecx, dx
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x126], ax
lea eax, [ebp - 0x128]
push 0x10
push eax
push dword [0x520420]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x414b76
nop dword [eax + eax]
mov cx, word [0x5240a2]
test cx, cx
je 0x414c1d
cmp ebx, edi
je 0x414c1d
mov eax, dword [ebp - 0x12c]
inc ebx
inc eax
mov dword [ebp - 0x12c], eax
cdq
idiv edi
add dx, cx
movzx eax, dx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x126], ax
lea eax, [ebp - 0x128]
push 0x10
push eax
push dword [0x520420]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x414b20
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x128]
push eax
push dword [0x520420]
call dword [sym.imp.WS2_32.dll_getsockname]
push dword [ebp - 0x126]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
mov eax, dword [0x51c9d0]
cmp dword [eax], 3
jl 0x414bc7
push edi
push 0x35b
push str.StartActiveRemote
call fcn.004048f0
push eax
push str._s__s:_d_DACP_port:__d_n
call fcn.004048b0
add esp, 0x14
push 0
push esi
call fcn.0045a370
add esp, 8
mov dword [0x52041c], eax
test eax, eax
jne 0x414c73
mov eax, dword [0x51c9d0]
cmp dword [eax], 1
jl 0x414d1e
push 0
push 0x35f
push str.StartActiveRemote
call fcn.004048f0
push eax
push str._s__s:_d_mdnsd_responder_start_error_n
call fcn.004048b0
add esp, 0x14
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
mov eax, dword [0x51c9d0]
cmp dword [eax], 1
jl 0x414c56
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 0x353
push str.StartActiveRemote
call fcn.004048f0
push eax
push str._s__s:_d_Cannot_bind_ActiveRemote:__s_n
call fcn.004048b0
add esp, 0x14
push dword [0x520420]
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret
push 0x100
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea ecx, [ebp - 0x104]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x414c90
mov eax, dword [str..local]
mov dword [ecx], eax
mov ax, word [0x4de790]
mov word [ecx + 4], ax
mov al, byte [0x4de792]
mov byte [ecx + 6], al
lea eax, [ebp - 0x104]
push esi
push eax
push dword [0x52041c]
call fcn.0045a2e0
push str.1A2B3D4EA1B2C3D5
push str.iTunes_Ctrl__s
lea eax, [ebp - 0x104]
push 0x100
push eax
call fcn.00408360
lea eax, [ebp - 0x118]
push eax
push 0
push edi
push str._dacp._tcp.local
lea eax, [ebp - 0x104]
push eax
push dword [0x52041c]
call fcn.0045a170
push eax
call fcn.00459fc0
push 0
push 0x412b10
push 0
push 0x520424
call fcn.0045bd00
add esp, 0x48
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004d3ed5
mov esp, ebp
pop ebp
ret