Function at 0x401fb0
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
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
sub esp, 0xc10
mov ecx, 0x100
xor eax, eax
lea edx, [esp + 0x410]
push ebx
push ebp
push edi
lea edi, [esp + 0x41c]
rep stosd dword es:[edi], eax
mov eax, dword [0x40af90]
mov ecx, dword [esp + 0xc20]
and eax, 0xffff
push eax
push ecx
push str._s_d
push edx
call fcn.00402608
add esp, 0x10
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x402010
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc10
ret
push 7
lea eax, [esp + 0x420]
push str.http:__
push eax
call fcn.004025d0
add esp, 0xc
test eax, eax
jne 0x40203d
mov cl, byte [esp + eax + 0x423]
mov byte [esp + eax + 0x1c], cl
inc eax
test cl, cl
jne 0x40202b
jmp 0x40204f
xor eax, eax
mov cl, byte [esp + eax + 0x41c]
mov byte [esp + eax + 0x1c], cl
inc eax
test cl, cl
jne 0x40203f
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40207c
mov dl, 0x2f
cmp byte [esp + ebx + 0x1c], dl
je 0x40207c
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
inc ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ebx, ecx
jb 0x402063
push 0x50
mov byte [esp + ebx + 0x20], 0
mov word [esp + 0x10], 2
call dword [sym.imp.WS2_32.dll_htons]
lea ecx, [esp + 0x1c]
mov word [esp + 0xe], ax
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x4020e6
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x4020c7
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc10
ret
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov edx, ecx
push esi
lea edi, [esp + 0x14]
mov esi, dword [eax]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x4020ea
mov dword [esp + 0x10], eax
xor eax, eax
lea ecx, [esp + 0xc]
push 0x10
mov dword [esp + 0x18], eax
push ecx
push ebp
mov dword [esp + 0x24], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40211a
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc10
ret
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x81c]
lea edx, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + ebx + 0x1d]
push edx
push eax
lea ecx, [esp + 0x824]
push str.GET___s_HTTP_1.0_r_nConnection:_Keep_Alive_r_nUser_Agent:_Mozilla_4.75__en___X11__U__Linux_2.2.16_3_i686__r_nHost:__s:80_r_nAccept:_image_gif__image_x_xbitmap__image_jpeg__image_pjpeg__image_png____r_nAccept_Encoding:_gzip_r_nAccept_Language:_en_r_nAccept_Charset:_iso_8859_1__utf_8_r_n_r_n
push ecx
call fcn.00402608
lea edi, [esp + 0x82c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
push 0
lea edx, [esp + 0x820]
push ecx
push edx
push ebp
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x402183
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc10
ret
push 0
lea eax, [esp + 0x20]
push 0x400
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
push ebp
jne 0x4021ae
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc10
ret
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xc10
ret