Function at 0x50c610
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 0x60619d
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x7c
mov eax, dword [0x689640]
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 int.007c23f6
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x50c67a
mov dword [ebp - 0x74], 9
push 0x678240
lea eax, [ebp - 0x74]
push eax
call fcn.00516565
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 str._d._d._d._d
lea edx, [ebp - 0x24]
push edx
call fcn.0050ad60
add esp, 0x18
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0073395a
mov dword [ebp - 0x88], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c]
push ecx
lea edx, [ebp - 0x64]
push edx
call fcn.0050af30
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.00727fe6
lea ecx, [ebp - 0x64]
call fcn.00719c52
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x4c]
call fcn.0074d431
mov ecx, dword [ebp - 0x6c]
cmp dword [ecx + 8], 0xffffffff
je 0x50c789
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 0x50c7b9
mov dword [ebp - 0x7c], 0xa
push 0x678240
lea eax, [ebp - 0x7c]
push eax
call fcn.00516565
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 0x50c835
mov dword [ebp - 0x84], 2
push 0x678240
lea ecx, [ebp - 0x84]
push ecx
call fcn.00516565
mov byte [ebp - 0x65], 1
jmp 0x50c856
mov dword [ebp - 4], 0xffffffff
jmp 0x50c868
jmp 0x50c871
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.00817892
mov esp, ebp
pop ebp
ret 8