Function at 0x6d6652b5
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Get socket status
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x1d4]
sub esp, 0x254
mov eax, dword [0x6d671098]
xor eax, ebp
mov dword [ebp + 0x1d0], eax
mov eax, dword [ebp + 0x1e4]
push ebx
mov ebx, dword [ebp + 0x1e0]
push esi
mov esi, dword [ebp + 0x1dc]
push edi
push dword [0x6d6715b8]
mov dword [ebp - 0x70], eax
mov eax, dword [esi]
push ebx
push esi
mov dword [ebp - 0x74], ebx
call dword [eax + 0x190]
or dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 0x68], eax
call sym.net.dll__ipv6_available_0
push dword [0x6d6715b4]
mov dword [ebp - 0x64], eax
mov eax, dword [esi]
push ebx
push esi
call dword [eax + 0x17c]
push dword [0x6d6715a8]
mov dword [ebp - 0x6c], eax
mov eax, dword [esi]
push ebx
push esi
call dword [eax + 0x17c]
cmp dword [ebp - 0x6c], 0
mov dword [ebp - 0x60], eax
je 0x6d66534c
push dword [0x6d67117c]
mov eax, dword [esi]
push dword [ebp - 0x6c]
push esi
call dword [eax + 0x190]
mov edi, eax
jmp 0x6d66534f
mov edi, dword [ebp - 0x68]
cmp dword [ebp - 0x64], 0
je 0x6d665370
cmp dword [ebp - 0x60], 0
je 0x6d665370
push dword [0x6d67117c]
mov eax, dword [esi]
push dword [ebp - 0x60]
push esi
call dword [eax + 0x190]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x70], 0
jne 0x6d665386
push str.inet_address_argument_is_null.
push esi
call sub.java.dll__JNU_ThrowNullPointerException_8
jmp 0x6d6656d4
push 0
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp + 0x1b4]
push eax
push dword [ebp + 0x1e8]
push dword [ebp - 0x70]
push esi
call sym.net.dll__NET_InetAddressToSockaddr_24
test eax, eax
jne 0x6d6656d4
cmp word [ebp + 0x1b4], 0x17
jne 0x6d665411
cmp dword [ebp - 0x64], eax
jne 0x6d6653ce
push str.Protocol_family_not_supported
push str.java_net_SocketException
push esi
call sub.java.dll__JNU_ThrowByName_12
jmp 0x6d6656d4
cmp dword [ebp - 0x5c], 0xffffffff
jne 0x6d6653db
push str.Destination_unreachable
jmp 0x6d6653be
push dword [ebp - 0x60]
mov eax, dword [esi]
push dword [0x6d6715b4]
push ebx
push esi
call dword [eax + 0x1a0]
mov eax, dword [esi]
push 0
push dword [0x6d6715a8]
push ebx
push esi
call dword [eax + 0x1a0]
push edi
call sym.net.dll__NET_InetAddressToSockaddr_24
mov eax, dword [ebp - 0x60]
mov edi, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], eax
jmp 0x6d665438
cmp dword [ebp - 0x5c], 0xffffffff
je 0x6d665433
mov eax, dword [esi]
push 0xffffffffffffffff
push dword [0x6d67117c]
push dword [ebp - 0x60]
push esi
call dword [eax + 0x1b4]
push dword [ebp - 0x5c]
call sym.net.dll__NET_InetAddressToSockaddr_24
cmp edi, 0xffffffff
je 0x6d6653d4
mov eax, dword [esi]
push 0
push dword [0x6d6715a8]
push ebx
push esi
call dword [eax + 0x1a0]
cmp dword [ebp + 0x1ec], 0
jg 0x6d66548d
xor eax, eax
cmp word [ebp + 0x1b4], 0x17
setne al
dec eax
and eax, 0xc
add eax, 0x10
push eax
lea eax, [ebp + 0x1b4]
push eax
push edi
call dword [sym.imp.ws2_32.dll_connect]
mov dword [ebp - 0x58], eax
cmp eax, 0xffffffff
jne 0x6d665503
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [ebp - 0x58], eax
jmp 0x6d665503
lea eax, [ebp - 0x5c]
push eax
xor ebx, ebx
push 0x8004667e
inc ebx
push edi
mov dword [ebp - 0x64], 4
mov dword [ebp - 0x5c], ebx
call dword [sym.imp.ws2_32.dll_ioctlsocket]
xor eax, eax
cmp word [ebp + 0x1b4], 0x17
setne al
dec eax
and eax, 0xc
add eax, 0x10
push eax
lea eax, [ebp + 0x1b4]
push eax
push edi
call dword [sym.imp.ws2_32.dll_connect]
mov dword [ebp - 0x58], eax
cmp eax, 0xffffffff
jne 0x6d6654eb
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x6d665529
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [ebp - 0x58], eax
xor ebx, ebx
lea eax, [ebp - 0x5c]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x5c], ebx
call dword [sym.imp.ws2_32.dll_ioctlsocket]
mov ebx, dword [ebp - 0x74]
cmp dword [ebp - 0x58], 0
je 0x6d66561c
cmp dword [ebp - 0x58], 0x2741
jne 0x6d665609
push str.connect:_Address_is_invalid_on_local_machine__or_port_is_not_valid_on_remote_machine
push str.java_net_ConnectException
jmp 0x6d6653c3
mov eax, dword [ebp + 0x1ec]
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp - 0x54], ebx
mov dword [ebp + 0xb0], ebx
xor ebx, ebx
mov dword [ebp - 0x50], edi
mov dword [ebp + 0xb4], edi
mov dword [ebp - 0x7c], eax
imul edx, edx, 0x3e8
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp + 0xb0]
push eax
lea eax, [ebp - 0x54]
push eax
push ebx
lea eax, [edi + 1]
push eax
mov dword [ebp - 0x78], edx
call dword [sym.imp.ws2_32.dll_select]
mov dword [ebp - 0x58], eax
cmp eax, ebx
jne 0x6d6655a9
push str.connect_timed_out
push str.java_net_SocketTimeoutException
push esi
call sub.java.dll__JNU_ThrowByName_12
push 2
push edi
call dword [sym.imp.ws2_32.dll_shutdown]
lea eax, [ebp - 0x5c]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x5c], ebx
call dword [sym.imp.ws2_32.dll_ioctlsocket]
jmp 0x6d6656d4
lea eax, [ebp + 0xb0]
push eax
push edi
call sub.ws2_32.dll___WSAFDIsSet
test eax, eax
jne 0x6d6655c2
mov dword [ebp - 0x58], ebx
jmp 0x6d6654ed
mov dword [ebp - 0x60], ebx
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x58]
push eax
push 0x1007
push 0xffff
push edi
call sym.net.dll__NET_InetAddressToSockaddr_24
cmp dword [ebp - 0x58], ebx
jne 0x6d6654ed
push ebx
call dword [sym.imp.kernel32.dll_Sleep]
inc dword [ebp - 0x60]
cmp dword [ebp - 0x60], 3
jl 0x6d6655c5
cmp dword [ebp - 0x58], ebx
jne 0x6d6654ed
push str.Unable_to_establish_connection
jmp 0x6d6653be
push str.connect
push dword [ebp - 0x58]
push esi
call sym.net.dll__NET_InetAddressToSockaddr_24
jmp 0x6d6656d4
mov eax, dword [esi]
push edi
push dword [0x6d67117c]
push dword [ebp - 0x6c]
push esi
call dword [eax + 0x1b4]
push dword [ebp - 0x70]
mov eax, dword [esi]
push dword [0x6d6715a0]
push ebx
push esi
call dword [eax + 0x1a0]
push dword [ebp + 0x1e8]
mov eax, dword [esi]
push dword [0x6d6715b0]
push ebx
push esi
call dword [eax + 0x1b4]
cmp dword [ebp - 0x68], 0
jne 0x6d6656d4
xor eax, eax
cmp word [ebp + 0x1b4], 0x17
setne al
dec eax
and eax, 0xc
add eax, 0x10
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp + 0x1b4]
push eax
push edi
call dword [sym.imp.ws2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x6d6656b2
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2736
jne 0x6d6656a3
push str.Socket_closed
jmp 0x6d6653be
push str.getsockname_failed
push esi
call fcn.6d663a00
pop ecx
pop ecx
jmp 0x6d6656d4
movzx eax, word [ebp + 0x1b6]
push eax
call dword [sym.imp.ws2_32.dll_ntohs]
mov ecx, dword [esi]
movzx eax, ax
push eax
push dword [0x6d6715b8]
push ebx
push esi
call dword [ecx + 0x1b4]
mov ecx, dword [ebp + 0x1d0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.6d66b1da
add ebp, 0x1d4
leave
ret 0x14