Function at 0x4cfb20
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add eax, 0x4e
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [edi + eax*4]
mov byte [ebp - 1], 0
mov dword [eax], 0xffffffff
mov edx, dword [ebx + 0xc]
mov dword [ebp - 8], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0xac], eax
mov al, byte [edx + 0x329]
mov dword [ebp + 0x14], edx
cmp al, 3
je 0x4cfb8a
cmp al, 6
je 0x4cfb7e
mov dword [ebp - 0xa8], 2
mov dword [ebp - 0xa4], 0x11
jmp 0x4cfb9e
mov dword [ebp - 0xa4], 0
jmp 0x4cfb94
mov dword [ebp - 0xa4], 6
mov dword [ebp - 0xa8], 1
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0xa0], eax
cmp eax, 0x80
jbe 0x4cfbbd
mov dword [ebp - 0xa0], 0x80
mov eax, 0x80
push eax
push dword [ecx + 0x18]
lea eax, [ebp - 0x9c]
push eax
call fcn.005d67e0
add esp, 0xc
cmp dword [ebx + 0x1b8], 0
je 0x4cfc0a
push 1
push ebx
call fcn.004bf010
lea eax, [ebp - 0xac]
push eax
mov eax, dword [ebx + 0x1b8]
push 0
push dword [ebx + 0x1bc]
call eax
mov esi, eax
push 0
push ebx
mov dword [ebp + 8], esi
call fcn.004bf010
add esp, 0x1c
jmp 0x4cfc27
push dword [ebp - 0xa4]
push dword [ebp - 0xa8]
push dword [ebp - 0xac]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp + 8], eax
cmp esi, 0xffffffff
je 0x4cfeba
mov eax, dword [ebp + 0x14]
cmp byte [eax + 0x329], 5
jne 0x4cfc47
push 1
push esi
call fcn.004e8970
add esp, 8
xor eax, eax
mov dword [ebp + 0x14], eax
movzx eax, word [ebp - 0x9c]
sub eax, 2
jne 0x4d0001
push 0x2e
lea eax, [ebp - 0xdc]
push eax
lea eax, [ebp - 0x98]
push eax
push 2
call fcn.004e89a0
add esp, 0x10
test eax, eax
je 0x4d0001
push dword [ebp - 0x9a]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
lea eax, [ebp - 0xdc]
push eax
push str.__Trying__s:_d...
push ebx
call fcn.004cde30
add esp, 0x10
cmp dword [ebp - 0xac], 2
jne 0x4cfd07
cmp dword [ebp - 0xa8], 1
jne 0x4cfd07
cmp byte [ebx + 0x6b3], 0
mov byte [ebp + 0xf], 1
je 0x4cfd0b
push 4
lea eax, [ebp + 8]
mov dword [ebp + 8], 1
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4cfd0b
push 0x100
lea eax, [ebp - 0x2dc]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.004b9790
push eax
push str.Could_not_set_TCP_NODELAY:__s
push ebx
call fcn.004cde30
add esp, 0x18
jmp 0x4cfd0b
mov byte [ebp + 0xf], 0
mov eax, dword [0x6a1d5c]
mov dword [ebp + 0x10], 0x4020
mov dword [ebp + 8], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x4cfd55
push 3
push 2
push eax
push eax
push 6
call fcn.004e8b10
add esp, 0x14
test al, al
je 0x4cfd49
mov dword [0x6a1d5c], 2
jmp 0x4cfd96
mov dword [0x6a1d5c], 1
jmp 0x4cfd5a
cmp eax, 2
je 0x4cfd96
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4cfd7f
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x10]
jg 0x4cfd96
push 4
lea eax, [ebp + 0x10]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [ebp + 0xf], 0
je 0x4cfe4d
cmp byte [ebx + 0x6ba], 0
je 0x4cfe4d
push 4
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 1
push eax
push 8
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4cfddd
push esi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d
push ebx
call fcn.004cde30
add esp, 0xc
jmp 0x4cfe4d
push dword [ebx + 0x668]
mov dword [ebp - 0x18], 1
call fcn.004d0100
push dword [ebx + 0x66c]
imul eax, eax, 0x3e8
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x14], eax
call fcn.004d0100
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp + 0xc], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x18]
push eax
push 0x98000004
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4cfe4d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
push ebx
call fcn.004cde30
add esp, 0x10
cmp dword [ebx + 0x1b0], 0
je 0x4cfe89
push 1
push ebx
call fcn.004bf010
mov eax, dword [ebx + 0x1b0]
push 0
push esi
push dword [ebx + 0x1b4]
call eax
push 0
push ebx
mov dword [ebp + 0xc], eax
call fcn.004bf010
mov eax, dword [ebp + 0xc]
add esp, 0x1c
cmp eax, 2
jne 0x4cfec6
mov byte [ebp - 1], 1
cmp dword [ebp - 0xac], 2
jne 0x4cfee1
push 0
push 2
push esi
push ebx
call fcn.004cf560
add esp, 0x10
mov dword [ebp + 0x14], eax
test eax, eax
je 0x4cfee1
push esi
push edi
push ebx
call fcn.004ce700
mov eax, dword [ebp + 0x14]
add esp, 0xc
cmp eax, 1
jne 0x4cfebf
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x4cfe89
push esi
push edi
push ebx
call fcn.004ce700
add esp, 0xc
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push esi
call fcn.004e8970
lea eax, [ebp - 0x1c]
push eax
call fcn.004d30a0
add esp, 0xc
cmp dword [edi + 0x314], 1
movups xmm0, xmmword [eax]
movups xmmword [edi + 0x260], xmm0
jle 0x4cff33
push 3
push dword [edi + 0x274]
push dword [edi + 0x270]
push ebx
call fcn.004beaa0
push 4
push dword [edi + 0x27c]
push dword [edi + 0x278]
push ebx
call fcn.004beaa0
add esp, 0x20
cmp byte [ebp - 1], 0
jne 0x4cfff3
cmp byte [edi + 0x329], 4
je 0x4cfff3
cmp byte [edi + 0x255], 0
jne 0x4cff83
push dword [ebp - 0xa0]
lea eax, [ebp - 0x9c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4cff83
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x4cfebf
mov ecx, dword [ebp - 8]
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [ebp + 0xc], eax
sub ecx, 0xb
je 0x4cffe5
sub ecx, 0x2728
je 0x4cffe5
sub ecx, 1
je 0x4cffe5
push 0x100
lea ecx, [ebp - 0x1dc]
push ecx
push eax
call fcn.004b9790
push eax
lea eax, [ebp - 0xdc]
push eax
push str.Immediate_connect_fail_for__s:__s
push ebx
call fcn.004cde30
mov eax, dword [ebp + 0xc]
push esi
push edi
push ebx
mov dword [ebx + 0x900], eax
call fcn.004ce700
add esp, 0x28
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0xdc], 0
call fcn.005b7f69
mov dword [eax], 0x273f
call fcn.005b7f69
mov esi, dword [eax]
call fcn.005b7f69
mov edi, eax
lea eax, [ebp - 0x1dc]
push 0x100
push eax
push esi
call fcn.004b9790
push eax
push dword [edi]
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.004cdd90
push dword [ebp + 8]
push dword [ebp + 0xc]
push ebx
call fcn.004ce700
add esp, 0x28
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret