Function at 0x4a15ef
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
xor edi, edi
cmp dword [ebx + 8], 0xffffffff
je 0x4a1621
mov ecx, dword [ebx + 0x10]
push edi
push dword [ebx + 8]
call fcn.004a0ce8
push dword [ebx + 8]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebx + 0xc]
push edi
push edi
push dword [ebx + 0x5c]
mov eax, dword [ecx]
push dword [ebx + 0x50]
push edi
call dword [eax]
mov eax, dword [ebx + 0x50]
push 2
pop ecx
cmp dword [eax + 8], edi
jne 0x4a1640
mov esi, edi
jmp 0x4a164a
mov esi, dword [ebx + 0x54]
test esi, esi
je 0x4a164f
mov esi, dword [esi + 4]
mov dword [ebp - 0x38], esi
jmp 0x4a1654
mov esi, ecx
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebx + 0x10]
mov edx, ebx
mov ecx, dword [ecx]
call fcn.004a03ee
push edi
push 1
push esi
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x40], esi
cmp esi, 0xffffffff
jne 0x4a1681
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
jmp 0x4a185f
cmp dword [ebx + 0x40], edi
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebx + 8], esi
je 0x4a16a9
push 4
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 1
push eax
push 0x100
push 0xffff
push esi
call edi
cmp dword [ebx + 0x44], 0
je 0x4a16c1
push 4
xor ecx, ecx
lea eax, [ebp - 0x34]
push eax
inc ecx
push ecx
push 6
push esi
mov dword [ebp - 0x34], ecx
call edi
cmp dword [ebx + 0x48], 0
je 0x4a16de
push 4
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 1
push eax
push 8
push 0xffff
push esi
call edi
mov edi, dword [ebx + 0x4c]
mov eax, dword [ebp - 0x38]
neg edi
push 0x10
pop ecx
push 0x17
sbb edi, edi
pop edx
and edi, 0x3ff
cmp eax, edx
push 0x1c
pop edx
cmove ecx, edx
cmp eax, 0x17
mov dword [ebp - 0x3c], ecx
lea edx, [ebp - 0x14]
lea ecx, [ebp - 0x30]
cmovne ecx, edx
mov dword [ebp - 0x34], ecx
push 0x17
pop ecx
cmp eax, ecx
jne 0x4a173c
push 0x1c
pop eax
push eax
lea eax, [ebp - 0x30]
push 0
push eax
call dword [sym.imp.msvcrt.dll_memset]
add esp, 0xc
push 0x17
pop eax
push edi
mov word [ebp - 0x30], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2e], ax
jmp 0x4a1759
push 2
pop eax
push 0
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htonl]
push edi
mov dword [ebp - 0x10], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
push dword [ebp - 0x3c]
push dword [ebp - 0x34]
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x4a1799
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2740
jne 0x4a179b
test di, di
je 0x4a185f
dec edi
test di, di
je 0x4a185f
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x38]
jmp 0x4a170e
xor esi, esi
test esi, esi
jne 0x4a185f
mov eax, dword [ebx + 0x54]
test eax, eax
je 0x4a17f8
push 0x17
pop ecx
cmp dword [ebp - 0x38], ecx
jne 0x4a17e9
movzx eax, word [ebx + 0x5c]
push eax
mov word [ebp - 0x30], cx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebx + 0x54]
lea edi, [ebp - 0x28]
mov word [ebp - 0x2e], ax
mov esi, dword [ecx + 0x18]
add esi, 8
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [ecx + 0x18]
mov eax, dword [eax + 4]
mov dword [ebp - 0x2c], eax
mov eax, dword [ecx + 0x18]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x18], eax
jmp 0x4a1823
push 2
pop ecx
mov word [ebp - 0x14], cx
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 4]
jmp 0x4a1811
mov ecx, dword [ebx + 0x58]
push 2
pop eax
mov word [ebp - 0x14], ax
mov eax, dword [ebx + 0x50]
mov eax, dword [eax + 0x10]
push dword [eax + ecx*4]
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x10], eax
movzx eax, word [ebx + 0x5c]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
mov esi, dword [ebp - 0x40]
mov ecx, dword [ebx + 0x10]
push 1
push esi
call fcn.004a0ce8
test eax, eax
je 0x4a183d
xor esi, esi
mov dword [ebx + 4], eax
inc esi
jmp 0x4a1871
push dword [ebp - 0x3c]
push dword [ebp - 0x34]
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4a1868
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
je 0x4a186f
mov dword [ebx + 4], str.Network_error__winsock_.
jmp 0x4a1871
mov dword [ebx + 0x28], 1
xor esi, esi
mov ecx, dword [ebx + 0x10]
mov edx, ebx
mov ecx, dword [ecx]
call fcn.0049fe1b
test esi, esi
je 0x4a1894
mov ecx, dword [ebx + 0xc]
push esi
push dword [ebx + 4]
push dword [ebx + 0x5c]
mov eax, dword [ecx]
push dword [ebx + 0x50]
push 1
call dword [eax]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401000
mov esp, ebp
pop ebp
ret