Function at 0x6d77259d
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x6d781098]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x30], 0
or dword [ebp - 0x34], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
push edi
mov edi, dword [ebp + 0x10]
push edi
push esi
call dword [eax + 0x2ac]
cmp eax, 4
je 0x6d7725d7
xor al, al
jmp 0x6d772825
push 0x10
lea eax, [ebp - 0x14]
push 0
push eax
call sub.msvcr100.dll_memset
push 4
lea eax, [ebp - 0x28]
push 0
push eax
call sub.msvcr100.dll_memset
mov eax, dword [esi]
add esp, 0x18
lea ecx, [ebp - 0x28]
push ecx
push 4
push 0
push edi
push esi
call dword [eax + 0x320]
movsx eax, byte [ebp - 0x28]
movzx ecx, byte [ebp - 0x27]
mov edi, dword [sym.imp.ws2_32.dll_htonl]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp - 0x26]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp - 0x25]
shl eax, 8
or eax, ecx
push eax
call edi
push 2
mov dword [ebp - 0x10], eax
pop eax
mov word [ebp - 0x14], ax
test ebx, ebx
je 0x6d772695
push 4
lea eax, [ebp - 0x28]
push 0
push eax
call sub.msvcr100.dll_memset
mov eax, dword [esi]
add esp, 0xc
lea ecx, [ebp - 0x28]
push ecx
push 4
push 0
push ebx
push esi
call dword [eax + 0x320]
movsx eax, byte [ebp - 0x28]
movzx ecx, byte [ebp - 0x27]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp - 0x26]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebp - 0x25]
shl eax, 8
or eax, ecx
push eax
call edi
mov dword [ebp - 0x20], eax
push 2
pop eax
mov word [ebp - 0x24], ax
xor eax, eax
mov word [ebp - 0x22], ax
lea edi, [ebp - 0x24]
jmp 0x6d772698
mov edi, dword [ebp - 0x30]
push 0
push 1
push 2
call fcn.6d77465c
mov ebx, eax
add esp, 0xc
cmp ebx, 0xffffffff
jne 0x6d7726c4
push str.Cant_create_socket
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.6d77b24a
jmp 0x6d7725d0
cmp dword [ebp + 0x1c], 0
jle 0x6d7726db
push 4
lea eax, [ebp + 0x1c]
push eax
push 4
push 0
push ebx
call dword [sym.imp.ws2_32.dll_setsockopt]
test edi, edi
je 0x6d77270b
push 0x10
push edi
push ebx
call dword [sym.imp.ws2_32.dll_bind]
test eax, eax
jns 0x6d77270b
push str.Cant_bind_socket
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.6d77b24a
push ebx
call dword [sym.imp.ws2_32.dll_closesocket]
jmp 0x6d7725d0
call dword [sym.imp.ws2_32.dll_WSACreateEvent]
push 0x31
push eax
push ebx
mov dword [ebp - 0x30], eax
call dword [sym.imp.ws2_32.dll_WSAEventSelect]
push 7
call dword [sym.imp.ws2_32.dll_htons]
mov word [ebp - 0x12], ax
push 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.ws2_32.dll_connect]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x6d772813
mov edi, dword [sym.imp.ws2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x274d
je 0x6d772813
call edi
cmp eax, 0x273e
je 0x6d772805
cmp eax, 0x2741
jle 0x6d77277f
cmp eax, 0x2743
jle 0x6d772805
cmp eax, 0x2751
je 0x6d772805
call edi
cmp eax, 0x2733
je 0x6d7727b4
push str.connect_failed
push str.java_net_ConnectException
push esi
call fcn.6d77b24a
add esp, 0xc
mov byte [ebp - 0x29], 0
push dword [ebp - 0x30]
call dword [sym.imp.ws2_32.dll_WSACloseEvent]
push ebx
call dword [sym.imp.ws2_32.dll_closesocket]
mov al, byte [ebp - 0x29]
jmp 0x6d772825
push dword [ebp + 0x14]
push 4
push ebx
push esi
call fcn.6d7744dd
add esp, 0x10
test eax, eax
js 0x6d772805
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x34]
push eax
push 0x1007
push 0xffff
push ebx
mov dword [ebp - 0x38], 4
call dword [sym.imp.ws2_32.dll_getsockopt]
test eax, eax
jns 0x6d7727f0
call edi
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x6d7727ff
cmp dword [ebp - 0x34], 0x274d
jne 0x6d772805
mov byte [ebp - 0x29], 1
jmp 0x6d77279f
push dword [ebp - 0x30]
call dword [sym.imp.ws2_32.dll_WSACloseEvent]
jmp 0x6d7726ff
push dword [ebp - 0x30]
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.6d77b1da
leave
ret 0x18