Function at 0x419180
Capabilities:
Connect socket
Connect udp socket
Create udp socket

Disassembly:
push ebp
mov eax, 0x4b87d0
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 0xc]
call fcn.004169f0
test eax, eax
mov edi, eax
je 0x4192c6
mov eax, dword [0x4f3454]
test eax, eax
je 0x4192f0
mov eax, 2
mov dword [ebp - 0x28], 0
mov word [ebp - 0x28], ax
movzx eax, word [ebp + 8]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
sub esp, 4
mov word [ebp - 0x26], ax
mov dword [esp], 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
sub esp, 4
mov dword [ebp - 0x24], eax
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
cmp eax, 0xffffffff
je 0x4192d3
lea edx, [ebp - 0x28]
mov dword [edi + 0xc], eax
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_connect]
sub esp, 0xc
test eax, eax
js 0x419300
mov esi, dword [edi + 4]
cmp ebx, 1
mov ecx, 0x4b77f9
mov eax, str.udp:
cmove eax, ecx
mov ecx, 0xffffffff
test esi, esi
je 0x419274
cmp edi, 0x4f3460
jb 0x419274
cmp edi, 0x4f5060
jb 0x419553
mov esi, dword [ebp + 8]
mov dword [esp + 0x10], eax
lea eax, [edi + 0x18]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], str._d_lo_client:_s_d_
mov dword [esp + 0x14], esi
mov dword [esp + 4], 0x20
mov dword [esp], eax
call fcn.0049fc60
test byte [0x4f3060], 0x80
jne 0x419460
mov eax, dword [edi + 4]
test eax, eax
je 0x4192c6
cmp edi, 0x4f3460
jb 0x4192c6
cmp edi, 0x4f5060
jb 0x419570
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x4f3060], 0x80
jne 0x4193c8
mov eax, dword [edi + 4]
test eax, eax
je 0x4192c6
mov eax, edi
call fcn.00416160
jmp 0x4192c6
call fcn.004163e0
jmp 0x4191ad
test byte [0x4f3060], 0x80
je 0x4192e0
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov eax, dword [eax]
mov dword [esp], 0x4f3068
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x30], eax
call sub.msvcrt.dll__getpid
mov ecx, dword [ebp - 0x30]
mov dword [esp + 8], str.socket_loopback_client
mov dword [esp + 4], 0x4b7278
mov dword [esp + 0x10], ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], eax
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049fc30
call esi
mov edx, dword [ebp - 0x2c]
cmp ebx, 1
mov ecx, 0x4b77f0
mov dword [eax], edx
mov eax, 0x4b77ec
cmove eax, ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.socket_loopback_client:_could_not_connect_to__s:_d_n
mov dword [esp + 0xc], ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049fc30
mov ecx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ecx + 0x40]
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov edx, dword [ebp - 0x2c]
mov dword [eax], edx
jmp 0x4192e0
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov esi, dword [eax]
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x2c], eax
call sub.msvcrt.dll__getpid
mov edx, dword [ebp - 0x2c]
mov dword [esp + 8], str.socket_loopback_client
mov dword [esp + 4], 0x4b7278
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049fc30
call ebx
mov dword [eax], esi
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.socket_loopback_client:_could_not_create_socket_n
add eax, 0x40
mov dword [esp], eax
call fcn.0049fc30
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call ebx
mov dword [eax], esi
jmp 0x4192e0
mov esi, dword [sym.imp.msvcrt.dll__errno]
call esi
mov eax, dword [eax]
mov dword [esp], 0x4f3068
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x30], eax
call sub.msvcrt.dll__getpid
mov ecx, dword [ebp - 0x30]
mov dword [esp + 8], str.socket_loopback_client
mov dword [esp + 4], 0x4b7278
mov dword [esp + 0x10], ecx
mov ecx, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], eax
lea eax, [ecx + 0x40]
mov dword [esp], eax
call fcn.0049fc30
call esi
mov edx, dword [ebp - 0x2c]
mov ecx, 0xffffffff
mov dword [eax], edx
mov edx, dword [edi + 4]
test edx, edx
je 0x4194f0
cmp edi, 0x4f3460
jb 0x4194f0
cmp edi, 0x4f5060
jae 0x4194f0
mov eax, edi
sub eax, 0x4f3460
sar eax, 3
imul eax, eax, 0xb6db6db7
lea ecx, [eax + 0x64]
lea esi, [esi]
cmp ebx, 1
mov eax, 0x4b77ec
mov ebx, 0x4b77f0
cmove eax, ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], ecx
mov dword [esp + 4], str.socket_loopback_client:_port__d_type__s___fd__d_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0049fc30
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4f3068
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
call esi
mov esi, dword [ebp - 0x2c]
mov dword [eax], esi
jmp 0x4192ab
mov ecx, edi
sub ecx, 0x4f3460
sar ecx, 3
imul ecx, ecx, 0xb6db6db7
add ecx, 0x64
jmp 0x419274
mov edx, edi
sub edx, 0x4f3460
sar edx, 3
imul edx, edx, 0xb6db6db7
lea eax, [edx + 0x64]
jmp 0x4192cb