Function at 0x4c9a60
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56297d
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x7c
mov eax, dword [0x5c5604]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x6c], ecx
mov byte [ebp - 0x65], 0
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 8]
call fcn.00406b60
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x4c9aca
mov dword [ebp - 0x74], 9
push 0x5b808c
lea eax, [ebp - 0x74]
push eax
call fcn.005002f2
xor ecx, ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov edx, 1
imul eax, edx, 3
mov ecx, 4
imul edx, ecx, 0
mov ecx, dword [ebp - 0x70]
mov ecx, dword [ecx + 0xc]
mov edx, dword [ecx + edx]
movsx eax, byte [edx + eax]
and eax, 0xff
push eax
mov ecx, 1
shl ecx, 1
mov edx, 4
imul eax, edx, 0
mov edx, dword [ebp - 0x70]
mov edx, dword [edx + 0xc]
mov eax, dword [edx + eax]
movsx ecx, byte [eax + ecx]
and ecx, 0xff
push ecx
mov edx, 1
shl edx, 0
mov eax, 4
imul ecx, eax, 0
mov eax, dword [ebp - 0x70]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + ecx]
movsx edx, byte [ecx + edx]
and edx, 0xff
push edx
mov eax, 1
imul ecx, eax, 0
mov edx, 4
imul eax, edx, 0
mov edx, dword [ebp - 0x70]
mov edx, dword [edx + 0xc]
mov eax, dword [edx + eax]
movsx ecx, byte [eax + ecx]
and ecx, 0xff
push ecx
push 0x57852c
lea edx, [ebp - 0x24]
push edx
call fcn.004c8250
add esp, 0x18
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00406c50
mov dword [ebp - 0x88], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c]
push ecx
lea edx, [ebp - 0x64]
push edx
call fcn.004c83c0
add esp, 8
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
push eax
mov ecx, dword [ebp - 0x6c]
add ecx, 0xc
call fcn.00402660
lea ecx, [ebp - 0x64]
call fcn.00402640
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.00406be0
mov ecx, dword [ebp - 0x6c]
cmp dword [ecx + 8], 0xffffffff
je 0x4c9bd9
mov edx, dword [ebp - 0x6c]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x6c]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x6c]
cmp dword [edx + 8], 0xffffffff
jne 0x4c9c09
mov dword [ebp - 0x7c], 0xa
push 0x5b808c
lea eax, [ebp - 0x7c]
push eax
call fcn.005002f2
mov dword [ebp - 0x80], 0x2710
push 4
lea ecx, [ebp - 0x80]
push ecx
push 0x1006
push 0xffff
mov edx, dword [ebp - 0x6c]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, 2
mov word [ebp - 0x34], cx
movzx edx, word [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x32], ax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x30], eax
push 0x10
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x6c]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4c9c85
mov dword [ebp - 0x84], 2
push 0x5b808c
lea ecx, [ebp - 0x84]
push ecx
call fcn.005002f2
mov byte [ebp - 0x65], 1
jmp 0x4c9ca6
mov dword [ebp - 4], 0xffffffff
jmp 0x4c9cb8
jmp 0x4c9cc1
mov al, byte [ebp - 0x65]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004ee000
mov esp, ebp
pop ebp
ret 8