Function at 0x10001b70
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
Reference http user-agent string
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x10007f82
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
mov al, byte [esp + 0x5c]
push ebx
push ebp
push esi
push edi
push 0
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 0
push 1
push 2
mov dword [esp + 0x68], 0
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
or ebx, 0xffffffff
cmp edi, ebx
mov dword [esp + 0x14], edi
jne 0x10001be9
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x60], ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop edi
pop esi
pop ebp
mov eax, str.socket
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
mov ecx, dword [esp + 0x6c]
mov word [esp + 0x44], 2
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov esi, dword [esp + 0x68]
mov word [esp + 0x46], ax
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x10001c37
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x60], ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop edi
pop esi
pop ebp
mov eax, 0x1000b248
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
mov edx, dword [eax + 0xc]
push 0x10
mov eax, dword [edx]
lea edx, [esp + 0x48]
push edx
push edi
mov ecx, dword [eax]
mov dword [esp + 0x54], ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, ebx
jne 0x10001c7c
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x60], ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop edi
pop esi
pop ebp
mov eax, str.socketl
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
mov ebp, dword [esp + 0x74]
mov ebx, dword [esp + 0x70]
test ebp, ebp
jne 0x10001c96
mov edi, dword [ebx]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
push ebp
lea eax, [esp + 0x1c]
push 0x1000b234
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edi, 0x1000c9a8
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x1000c9a8
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov edi, str.POST
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.POST
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov edx, dword [esp + 0x64]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str._HTTP_1.1_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str._HTTP_1.1_r_n
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.Host:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Host:
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, 0x1000b18c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x1000b18c
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.Connection:_keep_alive__r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Connection:_keep_alive__r_n
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.Accept:_text_html_application_xhtmlxml_application_xml_q0.9___q0.8__r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Accept:_text_html_application_xhtmlxml_application_xml_q0.9___q0.8__r_n
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.User_Agent:_Mozilla_5.0__Windows_NT_5.1__AppleWebKit_537.17__KHTML__like_Gecko__Chrome_24.0.1312.57_Safari_537.17_SE_2.X_MetaSr_1.0_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.User_Agent:_Mozilla_5.0__Windows_NT_5.1__AppleWebKit_537.17__KHTML__like_Gecko__Chrome_24.0.1312.57_Safari_537.17_SE_2.X_MetaSr_1.0_r_n
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.Accept_Language:_zh_CN_zh_q0.8_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Accept_Language:_zh_CN_zh_q0.8_r_n
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.Accept_Charset:_GBK_utf_8_q0.7__q0.3_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Accept_Charset:_GBK_utf_8_q0.7__q0.3_r_n
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.Content_Type:_application_x_www_form_urlencoded_r_n
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Content_Type:_application_x_www_form_urlencoded_r_n
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, str.Content_Length:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Content_Length:
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
lea edi, [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, 0x1000b18c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x1000b18c
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov edi, 0x1000b18c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x1000b18c
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov eax, dword [esp + 0x2c]
mov edx, dword [ebx]
mov dword [esp + 0x6c], edx
lea ecx, [eax + ebp + 1]
push ecx
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x30]
mov edi, eax
xor eax, eax
mov dword [ebx], edi
lea ecx, [edx + ebp + 1]
add esp, 4
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x10001eee
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [ebx]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x6c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx]
mov edx, dword [esp + 0x2c]
mov ecx, ebp
add edi, edx
mov edx, ecx
mov esi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [esp + 0x2c]
xor esi, esi
add ebp, edx
cmp eax, esi
je 0x10001f40
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [ebx]
push esi
push ebp
mov ebp, dword [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_send]
mov cl, byte [esp + 0x6c]
push esi
mov byte [esp + 0x38], cl
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x1000c9a8
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x38]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x10001fac
mov edi, dword [esp + 0x38]
mov ecx, ebx
mov edx, ecx
mov esi, 0x1000c9a8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x3c], ebx
xor esi, esi
mov byte [eax + ebx], 0
push esi
lea ecx, [esp + 0x16]
push 1
push ecx
push ebp
mov byte [esp + 0x6c], 1
mov byte [esp + 0x22], 0
mov byte [esp + 0x23], 0
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x1000205f
lea edi, [esp + 0x12]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
repne scasb al, byte es:[edi]
mov eax, dword [edx]
mov edx, dword [esp + 0x3c]
not ecx
dec ecx
sub eax, edx
mov edi, ecx
cmp eax, edi
ja 0x10001ffa
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp edi, esi
jbe 0x10002041
mov ecx, dword [esp + 0x3c]
push esi
lea ebx, [ecx + edi]
lea ecx, [esp + 0x38]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x10002041
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov ecx, edi
lea esi, [esp + 0x12]
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
xor esi, esi
cmp byte [esp + 0x12], 0xd
je 0x1000205f
push esi
lea eax, [esp + 0x16]
push 1
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x10001fd2
cmp dword [esp + 0x3c], esi
jne 0x100020eb
mov ecx, dword [esp + 0x38]
cmp ecx, esi
je 0x1000208d
mov al, byte [ecx - 1]
test al, al
je 0x10002083
cmp al, 0xff
je 0x10002083
dec al
mov byte [ecx - 1], al
jmp 0x1000208d
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x38], esi
cmp ecx, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
je 0x100020d3
mov al, byte [ecx - 1]
test al, al
je 0x100020c9
cmp al, 0xff
je 0x100020c9
dec al
pop edi
pop esi
mov byte [ecx - 1], al
pop ebp
mov eax, 0x1000b1dc
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x1000b1dc
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, 0x1000b040
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov dword [esp + 0x6c], edi
je 0x10002178
mov ebx, dword [esp + 0x3c]
cmp ebx, esi
jbe 0x10002170
cmp edi, ebx
ja 0x10002170
movsx edx, byte [0x1000b040]
mov ebp, dword [esp + 0x38]
mov ecx, 1
sub ecx, edi
add ebx, ecx
push ebx
push edx
push ebp
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
cmp eax, esi
je 0x10002170
jmp 0x1000213f
mov edi, dword [esp + 0x6c]
mov ecx, edi
mov edi, 0x1000b040
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x100021a0
sub ebp, eax
lea ebx, [ebx + ebp - 1]
lea ebp, [eax + 1]
movsx eax, byte [0x1000b040]
push ebx
push eax
push ebp
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x1000213b
xor esi, esi
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [ecx]
mov ecx, dword [esp + 0x38]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp dword [edx], eax
je 0x10002212
cmp ecx, esi
je 0x100021b4
mov al, byte [ecx - 1]
test al, al
je 0x100021aa
cmp al, 0xff
je 0x100021aa
dec al
mov byte [ecx - 1], al
jmp 0x100021b4
mov ecx, dword [esp + 0x38]
sub eax, ecx
xor esi, esi
jmp 0x1000217c
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x38], esi
cmp ecx, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
je 0x100021fa
mov al, byte [ecx - 1]
test al, al
je 0x100021f0
cmp al, 0xff
je 0x100021f0
dec al
pop edi
pop esi
mov byte [ecx - 1], al
pop ebp
mov eax, str.success
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
pop edi
pop esi
pop ebp
mov eax, str.success
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
cmp ecx, esi
je 0x10002232
mov al, byte [ecx - 1]
test al, al
je 0x10002228
cmp al, 0xff
je 0x10002228
dec al
mov byte [ecx - 1], al
jmp 0x10002232
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x38], esi
cmp ecx, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
je 0x10002262
mov al, byte [ecx - 1]
test al, al
je 0x10002258
cmp al, 0xff
je 0x10002258
dec al
mov byte [ecx - 1], al
jmp 0x10002262
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x54]
pop edi
pop esi
pop ebp
mov eax, 0x1000b1cc
pop ebx
mov dword fs:[0], ecx
add esp, 0x50
ret