Function at 0x4023c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
mov eax, 0x2834
call fcn.0040b3b0
mov eax, dword [esp + 0x283c]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push eax
mov dword [esp + 0x1c], esi
mov word [esp + 0x24], 2
call sub.WSOCK32.dll_htons
mov ecx, dword [esp + 0x2848]
mov word [esp + 0x22], ax
push ecx
call sub.WSOCK32.dll_inet_addr
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x402415
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2834
ret 0x1c
mov ebx, dword [esp + 0x285c]
mov edx, dword [ebx]
push edx
call sub.WSOCK32.dll_closesocket
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [ebx], eax
jne 0x402448
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x2834
ret 0x1c
lea ecx, [esp + 0x20]
push 0x10
push ecx
push eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x40246c
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x2834
ret 0x1c
mov ebp, dword [esp + 0x2860]
mov ecx, 0xa00
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, 0x4119e8
call fcn.00402850
add esi, 4
push eax
push esi
push str.Accept:_image_gif__image_x_xbitmap__image_jpeg__image_pjpeg__application_vnd.ms_powerpoint__application_vnd.ms_excel__application_msword____r_nAccept_Language:_zh_cn_r_nAccept_Encoding:_gzip__deflate_r_nUser_Agent:_QQ_PET_Client_r_nHost:_218.18.95.214:8009_r_nContent_Type:_applation_octet_stream___r_nContent_Transfe_Encoding:_BINARY_r_nContent_Length:_0_r_nConnection:_Keep_Alive_r_nCache_Control:_no_cache_r_nX_TENCENT_PET_CLIENT_Version:_1_r_nX_TENCENT_PET_CLIENT_Command:_3_r_nX_TENCENT_PET_CLIENT_Message_Id:_1_r_nX_TENCENT_PET_CLIENT_Signature:__s_r_nX_TENCENT_PET_CLIENT_QQ_Main_VersionQQ:_1_r_nX_TENCENT_PET_CLIENT_QQ_Sub_Version:_1_r_nX_TENCENT_PET_CLIENT_From:__u_r_nX_TENCENT_PET_CLIENT_Data_Offset:__1_r_nX_TENCENT_PET_CLIENT_Data_Length:_0_r_n_r_n_r_n
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
xor edi, edi
mov esi, ecx
test esi, esi
jle 0x4024cc
mov eax, dword [ebx]
push 0
lea edx, [edi + ebp]
push esi
push edx
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x402523
sub esi, eax
add edi, eax
test esi, esi
jg 0x4024b0
mov ebx, dword [sym.imp.MSVCRT.dll_strstr]
mov ecx, 0xa00
xor eax, eax
mov edi, ebp
rep stosd dword es:[edi], eax
xor edi, edi
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x285c]
mov ecx, 0x2800
sub ecx, edi
push 0
push ecx
mov ecx, dword [eax]
lea edx, [edi + ebp]
push edx
push ecx
call sub.WSOCK32.dll_recv
mov esi, eax
test esi, esi
jle 0x402535
mov edx, dword [esp + 0x10]
push str._r_n_r_n
add edx, esi
push ebp
mov dword [esp + 0x18], edx
call ebx
add esp, 8
test eax, eax
jne 0x402559
add edi, esi
jmp 0x4024e3
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x2834
ret 0x1c
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
call fcn.0040b142
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
add esp, 0x2834
ret 0x1c
mov esi, dword [sym.imp.MSVCRT.dll_sscanf]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x44]
push edx
push eax
push str._s__d
push ebp
call esi
mov eax, dword [esp + 0x2c]
add esp, 0x10
cmp eax, 0xc8
je 0x402671
cmp eax, 0x12e
je 0x40259c
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
add esp, 0x2834
ret 0x1c
push str.Location:_http:__
push ebp
call ebx
mov esi, eax
add esp, 8
test esi, esi
jne 0x4025bf
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x2834
ret 0x1c
add esi, 0x11
push 0x4100d0
push esi
call ebx
add esp, 8
test eax, eax
jne 0x4025e3
pop edi
pop esi
pop ebp
mov eax, 0xb
pop ebx
add esp, 0x2834
ret 0x1c
mov edx, eax
sub edx, esi
test edx, edx
jle 0x40265f
cmp edx, 0x14
jge 0x40265f
mov ecx, edx
lea edi, [esp + 0x30]
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
mov byte [esp + edx + 0x30], 0
push ecx
push 0x410068
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
mov edx, dword [esp + 0x2868]
mov eax, dword [esp + 0x2864]
mov ecx, dword [esp + 0x2860]
add esp, 0xc
push ebp
push edx
mov edx, dword [esp + 0x2858]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edx
lea ecx, [esp + 0x44]
push eax
push ecx
mov ecx, dword [esp + 0x34]
call fcn.004023c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2834
ret 0x1c
pop edi
pop esi
pop ebp
mov eax, 0xc
pop ebx
add esp, 0x2834
ret 0x1c
push str.X_TENCENT_PET_CLIENT_Data_Total_Length:
push ebp
call ebx
mov edx, eax
add esp, 8
test edx, edx
jne 0x402694
pop edi
pop esi
pop ebp
mov eax, 0xd
pop ebx
add esp, 0x2834
ret 0x1c
lea eax, [esp + 0x14]
mov edi, str.X_TENCENT_PET_CLIENT_Data_Total_Length:
push eax
or ecx, 0xffffffff
xor eax, eax
push 0x410068
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x1c], 0
add ecx, edx
push ecx
call esi
mov ecx, dword [esp + 0x285c]
mov edx, dword [esp + 0x20]
push str._r_n_r_n
push ebp
mov dword [ecx], edx
call ebx
mov edx, eax
add esp, 0x14
test edx, edx
jne 0x4026ea
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
add esp, 0x2834
ret 0x1c
mov edi, str._r_n_r_n
or ecx, 0xffffffff
xor eax, eax
sub edx, ebp
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x2854]
pop edi
not ecx
dec ecx
pop esi
add edx, ecx
mov ecx, dword [esp + 0x2850]
mov dword [eax], edx
mov eax, dword [esp + 8]
sub eax, edx
pop ebp
mov dword [ecx], eax
xor eax, eax
pop ebx
add esp, 0x2834
ret 0x1c