Function at 0x6d662de1
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x6d671098]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
and dword [ebp - 0x5c], 0
or dword [ebp - 0x58], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
call sym.net.dll__ipv6_available_0
test eax, eax
jne 0x6d662e1b
xor al, al
jmp 0x6d66307d
mov eax, dword [esi]
push ebx
push esi
call dword [eax + 0x2ac]
cmp eax, 4
jne 0x6d662e40
push dword [ebp + 0x20]
push dword [ebp - 0x54]
push dword [ebp + 0x18]
push ebx
push edi
push esi
call fcn.6d66946d
jmp 0x6d66307d
push 0x10
pop edi
push edi
lea eax, [ebp - 0x14]
push 0
push eax
call sub.msvcr100.dll_memset
push 0x1c
lea eax, [ebp - 0x30]
push 0
push eax
call sub.msvcr100.dll_memset
mov eax, dword [esi]
add esp, 0x18
lea ecx, [ebp - 0x14]
push ecx
push edi
push 0
push ebx
push esi
call dword [eax + 0x320]
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x28]
push eax
call sub.msvcr100.dll_memcpy
add esp, 0xc
push 0x17
pop eax
mov word [ebp - 0x30], ax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
cmp eax, ebx
jle 0x6d662e94
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x54], ebx
je 0x6d662eee
push edi
lea eax, [ebp - 0x14]
push ebx
push eax
call sub.msvcr100.dll_memset
push 0x1c
lea eax, [ebp - 0x4c]
push ebx
push eax
call sub.msvcr100.dll_memset
mov eax, dword [esi]
add esp, 0x18
lea ecx, [ebp - 0x14]
push ecx
push edi
push ebx
push dword [ebp - 0x54]
push esi
call dword [eax + 0x320]
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x44]
push eax
call sub.msvcr100.dll_memcpy
add esp, 0xc
push 0x17
pop eax
mov word [ebp - 0x4c], ax
xor eax, eax
mov word [ebp - 0x4a], ax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x34], eax
lea edi, [ebp - 0x4c]
jmp 0x6d662ef1
mov edi, dword [ebp - 0x5c]
push ebx
push 1
push 0x17
call fcn.6d66465c
mov ebx, eax
add esp, 0xc
cmp ebx, 0xffffffff
jne 0x6d662f1d
call dword [sym.imp.msvcr100.dll__errno]
push str.Cant_create_socket
push dword [eax]
push esi
call fcn.6d66946d
jmp 0x6d662e14
cmp dword [ebp + 0x20], 0
jle 0x6d662f34
push 4
lea eax, [ebp + 0x20]
push eax
push 4
push 0x29
push ebx
call dword [sym.imp.ws2_32.dll_setsockopt]
test edi, edi
je 0x6d662f63
push 0x1c
push edi
push ebx
call sym.net.dll__NET_Bind_12
test eax, eax
jns 0x6d662f63
push str.Cant_bind_socket_to_interface
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.6d66946d
push ebx
call dword [sym.imp.ws2_32.dll_closesocket]
jmp 0x6d662e14
call dword [sym.imp.ws2_32.dll_WSACreateEvent]
push 0x31
push eax
push ebx
mov dword [ebp - 0x54], eax
call dword [sym.imp.ws2_32.dll_WSAEventSelect]
push 7
call dword [sym.imp.ws2_32.dll_htons]
mov word [ebp - 0x2e], ax
push 0x1c
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.ws2_32.dll_connect]
mov dword [ebp - 0x58], eax
test eax, eax
je 0x6d66306b
mov edi, dword [sym.imp.ws2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x274d
je 0x6d66306b
call edi
cmp eax, 0x273e
je 0x6d66305d
cmp eax, 0x2741
jle 0x6d662fd7
cmp eax, 0x2743
jle 0x6d66305d
cmp eax, 0x2751
je 0x6d66305d
call edi
cmp eax, 0x2733
je 0x6d66300c
push str.connect_failed
push str.java_net_ConnectException
push esi
call fcn.6d66946d
add esp, 0xc
mov byte [ebp - 0x4d], 0
push dword [ebp - 0x54]
call dword [sym.imp.ws2_32.dll_WSACloseEvent]
push ebx
call dword [sym.imp.ws2_32.dll_closesocket]
mov al, byte [ebp - 0x4d]
jmp 0x6d66307d
push dword [ebp + 0x18]
push 4
push ebx
push esi
call fcn.6d6644dd
add esp, 0x10
test eax, eax
js 0x6d66305d
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x58]
push eax
push 0x1007
push 0xffff
push ebx
mov dword [ebp - 0x5c], 4
call dword [sym.imp.ws2_32.dll_getsockopt]
test eax, eax
jns 0x6d663048
call edi
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
je 0x6d663057
cmp dword [ebp - 0x58], 0x274d
jne 0x6d66305d
mov byte [ebp - 0x4d], 1
jmp 0x6d662ff7
push dword [ebp - 0x54]
call dword [sym.imp.ws2_32.dll_WSACloseEvent]
jmp 0x6d662f57
push dword [ebp - 0x54]
call dword [sym.imp.ws2_32.dll_WSACloseEvent]
push ebx
call dword [sym.imp.ws2_32.dll_closesocket]
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.6d66b1da
leave
ret 0x20