Function at 0x4de874
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff9c4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x63c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4debe8
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
lea eax, [ebp - 0x2f8]
xor ecx, ecx
mov edx, 0x10
call fcn.004030bc
lea eax, [ebp - 0x2e8]
xor ecx, ecx
mov edx, 0x28
call fcn.004030bc
lea edx, [ebp - 0x63c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
call fcn.00408bf4
mov edx, dword [ebp - 0x63c]
lea eax, [ebp - 0x2f8]
call fcn.00409bbc
lea eax, [ebp - 0x2f8]
call fcn.00409b24
mov edi, eax
xor ebx, ebx
lea esi, [ebp - 0x2f8]
cmp edi, ebx
jg 0x4de911
mov edx, 0x4debfc
lea eax, [ebp - 0x2e8]
call fcn.00409c00
jmp 0x4de952
xor eax, eax
mov al, byte [esi]
mov edx, eax
shr edx, 4
add dl, 0x41
mov byte [ebp - 0x19], dl
and eax, 0xf
add al, 0x41
mov byte [ebp - 0x1a], al
lea eax, [ebp - 0x2e8]
call fcn.00409b24
mov dl, byte [ebp - 0x19]
mov byte [ebp + eax - 0x2e8], dl
lea eax, [ebp - 0x2e8]
call fcn.00409b24
mov dl, byte [ebp - 0x1a]
mov byte [ebp + eax - 0x2e8], dl
inc ebx
inc esi
cmp ebx, 0x10
jne 0x4de8fb
lea eax, [ebp - 0x488]
xor ecx, ecx
mov edx, 0x190
call fcn.004030bc
mov byte [ebp - 0x488], 0x81
mov byte [ebp - 0x485], 0x48
mov byte [ebp - 0x484], 0x20
lea eax, [ebp - 0x2e8]
call fcn.00409b24
mov ecx, eax
lea edx, [ebp - 0x483]
lea eax, [ebp - 0x2e8]
call fcn.00402970
lea eax, [ebp - 0x2e8]
call fcn.00409b24
add eax, 5
mov byte [ebp + eax - 0x487], 0x20
lea eax, [ebp - 0x637]
xor ecx, ecx
mov edx, 0x1f
call fcn.004030bc
mov ebx, 0xf
mov edx, 0x4debfc
lea eax, [ebp - 0x637]
call fcn.00409c00
dec ebx
jne 0x4de9cb
mov edx, 0x4dec00
lea eax, [ebp - 0x637]
call fcn.00409c00
lea eax, [ebp - 0x2e8]
call fcn.00409b24
add eax, 5
lea edx, [ebp + eax - 0x486]
lea eax, [ebp - 0x637]
mov ecx, 0x1f
call fcn.00402970
lea eax, [ebp - 0x1ac]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
test eax, eax
jne 0x4debcf
xor edx, edx
push ebp
push 0x4debc8
push dword fs:[edx]
mov dword fs:[edx], esp
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4dea56
call fcn.00404388
jmp 0x4debcf
mov word [ebp - 0x1bc], 2
push 0x8b
call sub.wsock32.dll_htons
mov word [ebp - 0x1ba], ax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x60]
call fcn.00404e20
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x10], 1
lea eax, [ebp - 0x10]
push eax
push 0x8004667e
push ebx
call sub.wsock32.dll_ioctlsocket
push 0x10
lea eax, [ebp - 0x1bc]
push eax
push ebx
call sub.wsock32.dll_connect
inc eax
jne 0x4deb9b
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x4deb9b
lea eax, [ebp - 0x2c0]
call fcn.004a319c
lea edx, [ebp - 0x2c0]
mov eax, ebx
call fcn.004a318c
mov eax, dword [ebp - 8]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov ecx, 0x3e8
cdq
idiv ecx
imul eax, edx, 0x3e8
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x2c0]
push eax
push 0
push 0
call sub.wsock32.dll_select
test eax, eax
jle 0x4deb9b
push 0
lea eax, [ebp - 0x2e8]
call fcn.00409b24
mov esi, eax
add esi, 5
lea eax, [ebp - 0x637]
call fcn.00409b24
add esi, eax
add esi, 2
inc esi
push esi
lea eax, [ebp - 0x488]
push eax
push ebx
call sub.wsock32.dll_send
lea eax, [ebp - 0x618]
xor ecx, ecx
mov edx, 0x190
call fcn.004030bc
lea eax, [ebp - 0x18]
push eax
push 0
push 0
lea eax, [ebp - 0x2c0]
push eax
push 0
call sub.wsock32.dll_select
test eax, eax
jle 0x4deb97
push 0
push 0x190
lea eax, [ebp - 0x618]
push eax
push ebx
call sub.wsock32.dll_recv
cmp byte [ebp - 0x618], 0
setne byte [ebp - 9]
mov byte [ebp - 9], 1
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0x8004667e
push ebx
call sub.wsock32.dll_ioctlsocket
push ebx
call sub.wsock32.dll_closesocket
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4debcf
call sub.wsock32.dll_WSACleanup
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4debef
lea eax, [ebp - 0x63c]
call fcn.00404960
ret