Function at 0x401b60
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Reference http user-agent string
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov eax, sym.___gxx_personality_sj0
mov ebp, esp
push edi
mov edi, 0x401e50
push esi
mov esi, 0xffffffff
push ebx
sub esp, 0x9fc
mov dword [ebp - 0x984], eax
mov eax, 0x4b261c
mov dword [ebp - 0x974], esp
xor ebx, ebx
mov dword [ebp - 0x980], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x97c], eax
lea eax, [ebp - 0x99c]
mov dword [esp], eax
mov dword [ebp - 0x978], edi
call sym.__Unwind_SjLj_Register
mov word [ebp - 0x28], 2
mov eax, dword [0x4bf014]
mov eax, dword [eax + 0x14]
movzx eax, word [eax + 0x460]
mov dword [ebp - 0x998], esi
mov dword [esp], eax
call sym._htons_4
mov word [ebp - 0x26], ax
sub esp, 4
mov dword [esp], 0x7f000001
call sym._htonl_4
mov dword [ebp - 0x24], eax
sub esp, 4
mov ecx, 1
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], 2
call sym._socket_12
mov dword [ebp - 0x9b0], eax
sub esp, 0xc
mov edx, 0xffffffff
mov dword [ebp - 0x9ac], edx
inc eax
je 0x401e30
mov eax, 0x10
mov edx, dword [ebp - 0x9b0]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, 0xffffffff
mov dword [esp], edx
mov dword [ebp - 0x998], eax
call sym._connect_12
sub esp, 0xc
test eax, eax
jne 0x401f78
lea eax, [ebp - 0x48]
mov edi, 0xc
mov dword [esp + 8], eax
mov eax, str.GET__image_ny_01.png_HTTP_1.1_r_nHost:_127.0.0.1_r_nUser_Agent:_Mozilla_5.0_r_nAccept_Language:_zh_cn_r_nConnection:_close_r_nCache_Control:_no_cache_r_n_r_n
mov dword [esp + 4], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
mov dword [ebp - 0x998], edi
call method.std::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_char_const__std::allocator_char__const_
mov edx, dword [ebp - 0x38]
xor esi, esi
mov ebx, 0xb
mov eax, dword [edx - 0xc]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x9b0]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [ebp - 0x998], ebx
call sym._send_16
sub esp, 0x10
inc eax
je 0x401f09
mov eax, 0x4b620c
mov dword [ebp - 0x168], eax
mov eax, dword [ebp - 0x9b0]
mov edi, 0xa
mov dword [ebp - 0x154], eax
mov eax, 1
lea edx, [ebp - 0x158]
mov dword [ebp - 0x158], eax
mov eax, 3
mov dword [ebp - 0x9a8], eax
xor eax, eax
mov dword [ebp - 0x9a4], eax
lea eax, [ebp - 0x9a8]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x9b0]
mov dword [esp + 4], edx
mov dword [ebp - 0x998], edi
inc eax
mov dword [esp], eax
call sym._select_20
sub esp, 0x14
test eax, eax
js 0x401f90
mov edx, dword [ebp - 0x9b0]
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
mov eax, 0xa
mov dword [esp], edx
mov dword [ebp - 0x998], eax
call sym.___WSAFDIsSet_8
sub esp, 8
test eax, eax
je 0x401dba
mov eax, 0x800
mov edi, 0x800
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
lea eax, [ebp - 0x968]
mov dword [esp], eax
call sym._memset
mov dword [esp + 8], edi
xor eax, eax
lea edx, [ebp - 0x968]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x9b0]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._recv_16
sub esp, 0x10
test eax, eax
jle 0x401dba
cld
mov edi, str.HTTP_1.1_200
lea esi, [ebp - 0x968]
mov ecx, 0xd
repe cmpsb byte [esi], byte es:[edi]
je 0x402068
mov eax, dword [ebp - 0x9b0]
mov edi, 2
mov esi, 0xa
mov dword [esp + 4], edi
mov dword [ebp - 0x998], esi
mov dword [esp], eax
call sym._shutdown_8
mov edx, dword [ebp - 0x9b0]
sub esp, 8
mov dword [esp], edx
call sym._closesocket_4
mov eax, dword [ebp - 0x168]
sub esp, 4
lea edx, [eax - 0xc]
mov dword [ebp - 0x9c4], edx
cmp edx, 0x4b6200
jne 0x402192
mov eax, dword [ebp - 0x38]
lea edx, [eax - 0xc]
cmp edx, 0x4b6200
mov dword [ebp - 0x9c8], edx
jne 0x402151
mov esi, 1
mov dword [ebp - 0x9ac], esi
nop
lea eax, [ebp - 0x99c]
mov dword [esp], eax
call sym.__Unwind_SjLj_Unregister
mov eax, dword [ebp - 0x9ac]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x9b0]
mov dword [esp], eax
call sym._closesocket_4
mov eax, dword [ebp - 0x38]
sub esp, 4
lea edx, [eax - 0xc]
mov dword [ebp - 0x9dc], edx
cmp edx, 0x4b6200
jne 0x401f3e
mov eax, 0xffffffff
mov dword [ebp - 0x9ac], eax
jmp 0x401e30
mov ecx, 0xffffffff
sub eax, 4
mov edx, 1
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [ebp - 0x998], edx
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
test eax, eax
jg 0x401f2e
mov edx, dword [ebp - 0x9dc]
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edx
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
jmp 0x401f2e
mov eax, dword [ebp - 0x9b0]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov eax, 2
jmp 0x401f33
mov eax, dword [ebp - 0x9b0]
mov esi, 2
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._shutdown_8
mov edx, dword [ebp - 0x9b0]
sub esp, 8
mov dword [esp], edx
call sym._closesocket_4
mov eax, dword [ebp - 0x168]
sub esp, 4
lea edx, [eax - 0xc]
mov dword [ebp - 0x9d4], edx
cmp edx, 0x4b6200
jne 0x402110
mov eax, dword [ebp - 0x38]
lea edx, [eax - 0xc]
cmp edx, 0x4b6200
mov dword [ebp - 0x9d8], edx
je 0x401f2e
sub eax, 4
mov edx, 0xffffffff
mov dword [esp], eax
mov eax, 2
mov dword [esp + 4], edx
mov dword [ebp - 0x998], eax
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
test eax, eax
jg 0x401f2e
mov edx, dword [ebp - 0x9d8]
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
jmp 0x401f6e
mov edx, dword [ebp - 0x9b0]
mov esi, 2
mov dword [esp + 4], esi
mov dword [esp], edx
call sym._shutdown_8
mov eax, dword [ebp - 0x9b0]
sub esp, 8
mov dword [esp], eax
call sym._closesocket_4
mov eax, dword [ebp - 0x168]
sub esp, 4
lea edx, [eax - 0xc]
mov dword [ebp - 0x9cc], edx
cmp edx, 0x4b6200
jne 0x402216
mov eax, dword [ebp - 0x38]
lea edx, [eax - 0xc]
cmp edx, 0x4b6200
mov dword [ebp - 0x9d0], edx
jne 0x4021d3
xor eax, eax
jmp 0x401f33
mov ebx, 0xffffffff
sub eax, 4
mov ecx, 3
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x998], ecx
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
test eax, eax
jg 0x401fd6
mov edx, dword [ebp - 0x9d4]
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edx
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
jmp 0x401fd6
mov edx, 0xffffffff
sub eax, 4
mov edi, 6
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [ebp - 0x998], edi
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
test eax, eax
jg 0x401e23
mov edx, dword [ebp - 0x9c8]
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edx
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
jmp 0x401e23
mov ebx, 0xffffffff
sub eax, 4
mov ecx, 7
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x998], ecx
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
test eax, eax
jg 0x401e0b
mov edx, dword [ebp - 0x9c4]
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edx
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
jmp 0x401e0b
sub eax, 4
mov edx, 0xffffffff
mov dword [esp], eax
mov eax, 4
mov dword [esp + 4], edx
mov dword [ebp - 0x998], eax
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
test eax, eax
jg 0x4020c6
mov edx, dword [ebp - 0x9d0]
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edx
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
xor eax, eax
jmp 0x401f33
mov ebx, 0xffffffff
sub eax, 4
mov ecx, 5
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x998], ecx
call method.__gnu_cxx.__exchange_and_add_int_volatile__int_
test eax, eax
jg 0x4020ae
mov edx, dword [ebp - 0x9cc]
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], edx
call method.std::string::_Rep._M_destroy_std::allocator_char__const_
jmp 0x4020ae