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

Disassembly:
push ebp
mov eax, 0x4aee3c
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov esi, dword [ebp + 0xc]
call fcn.004145b0
mov edi, eax
or eax, 0xffffffff
test edi, edi
je 0x416d66
mov ebx, dword [0x4e9018]
test ebx, ebx
je 0x416d70
sub esp, 0xc
mov eax, dword [ebp + 8]
and eax, 0xffff
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov word [ebp - 0x1c], 2
push eax
call sub.WS2_32.DLL_htons
mov word [ebp - 0x1a], ax
lea ebx, [ebp - 0x1c]
push 0x7f000001
call sub.WS2_32.DLL_htonl
mov dword [ebp - 0x18], eax
push ecx
push ecx
push 0
push esi
push 2
call sub.WS2_32.DLL_socket
add esp, 0x14
cmp eax, 0xffffffff
je 0x416e21
mov dword [edi + 0xc], eax
push ecx
push 0x10
push ebx
push eax
call sub.WS2_32.DLL_connect
pop edx
test eax, eax
js 0x416ea2
mov eax, str.udp:
cmp esi, 1
je 0x416e10
mov edx, dword [ebp + 8]
push ecx
push ecx
push edx
push eax
mov eax, edi
call fcn.00413680
push eax
lea eax, [edi + 0x18]
push str._d_lo_client:_s_d_
push 0x20
push eax
call fcn.004a0540
add esp, 0x20
cmp byte [0x4ec098], 0
js 0x416d80
mov eax, edi
call fcn.00413680
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00415d30
jmp 0x416cb1
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x4ec0a8
mov dword [ebp - 0x20], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.socket_loopback_client
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call fcn.00413b80
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
mov eax, edi
call fcn.00413680
add esp, 0x10
mov edx, 0x4ae831
dec esi
je 0x416e1a
sub esp, 0xc
push eax
mov eax, dword [ebp + 8]
push edx
push eax
push str.socket_loopback_client:_port__d_type__s___fd__d_n
push ebx
call fcn.00413b80
add esp, 0x14
push ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
jmp 0x416d5f
mov eax, 0x4ae81c
jmp 0x416d34
mov edx, 0x4ae835
jmp 0x416dd4
cmp byte [0x4ec098], 0
js 0x416e39
mov eax, edi
call fcn.004136d0
or eax, 0xffffffff
jmp 0x416d66
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ec0a8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.socket_loopback_client
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call fcn.00413b80
call sub.msvcrt.dll__errno
mov dword [eax], esi
pop eax
pop edx
push str.socket_loopback_client:_could_not_create_socket_n
push ebx
call fcn.00413b80
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
jmp 0x416e2a
cmp byte [0x4ec098], 0
jns 0x416e2a
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x4ec0a8
mov dword [ebp - 0x24], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.socket_loopback_client
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call fcn.00413b80
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x24]
add esp, 0x10
dec esi
mov dword [eax], edx
mov eax, 0x4ae831
je 0x416f32
mov esi, dword [ebp + 8]
push esi
push eax
push str.socket_loopback_client:_could_not_connect_to__s:_d_n
push ebx
call fcn.00413b80
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
jmp 0x416e2a
mov eax, 0x4ae835
jmp 0x416efc