Function at 0x4020f0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x40b8cc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x200
push ebx
mov ebx, dword [esp + 0x220]
push ebp
push esi
push edi
mov edi, dword [ebx + 4]
xor ebp, ebp
mov dword [esp + 0x2c], ecx
cmp edi, ebp
jne 0x402129
mov edi, 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]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
push esi
lea eax, [esp + 0x18]
push 0x41156c
push eax
mov dword [esp + 0x224], ebp
call sub.MFC42.DLL_CString::Format
mov cl, byte [esp + 0x27]
add esp, 0xc
mov byte [esp + 0x1c], cl
lea ecx, [esp + 0x1c]
push ebp
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, 0x412700
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x412700
lea ecx, [esp + 0x24]
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
mov byte [esp + 0x218], 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.POST
lea ecx, [esp + 0x24]
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 edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, dword [esp + 0x228]
mov eax, dword [edx]
push eax
push ebp
push ecx
lea ecx, [esp + 0x28]
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov edi, str.___HTTP_1.0_r_nFrom:___local_r_nUser_Agent:___post_test_1.0_r_nContent_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.___HTTP_1.0_r_nFrom:___local_r_nUser_Agent:___post_test_1.0_r_nContent_Type:___application_x_www_form_urlencoded_r_n
lea ecx, [esp + 0x24]
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 edx, dword [esp + 0x2c]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [edx + 4]
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x24]
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 + 0x24]
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 esi, dword [esp + 0x220]
push 0x4119c4
lea eax, [esp + 0x74]
push esi
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
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 byte [esp + 0x218], 2
mov edx, dword [ecx]
lea ecx, [esp + 0x1c]
push edx
push ebp
push eax
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x74]
mov byte [esp + 0x21c], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x54]
push eax
push 0x4119b0
push ecx
call sub.MFC42.DLL_operator
push str._r_n_r_n
lea edx, [esp + 0x5c]
push eax
push edx
mov byte [esp + 0x224], 3
call sub.MFC42.DLL_operator_1
mov edx, dword [eax]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x218], 4
push ecx
push edx
lea ecx, [esp + 0x24]
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 ecx, [esp + 0x58]
mov byte [esp + 0x218], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x54]
mov byte [esp + 0x218], 1
call sub.MFC42.DLL_CString::CString
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, dword [eax]
push ecx
push ebp
push ebx
lea ecx, [esp + 0x28]
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
lea edx, [esp + 0x80]
push edx
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40233f
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x21c], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x218], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4026c7
mov esi, dword [esi + 4]
cmp esi, ebp
jne 0x40234c
mov esi, 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]
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
cmp esi, ebp
jne 0x40238e
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x21c], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x218], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4026c7
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov eax, dword [esp + 0x224]
push eax
mov word [esp + 0x60], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x5e], ax
mov ecx, dword [esi + 0xc]
push 0x10
mov edx, dword [ecx]
lea ecx, [esp + 0x60]
push ecx
push ebx
mov eax, dword [edx]
mov dword [esp + 0x6c], eax
call dword [sym.imp.WS2_32.dll_connect]
or esi, 0xffffffff
cmp eax, esi
jne 0x4023fc
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x21c], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x4024c7
mov dl, byte [esp + 0x1c]
push ebp
lea ecx, [esp + 0x38]
mov byte [esp + 0x38], dl
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 eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [esp + 0x1c]
mov ecx, dword [eax]
push ecx
push ebp
push edx
lea ecx, [esp + 0x40]
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov edx, dword [esp + 0x38]
mov byte [esp + 0x218], 5
cmp edx, ebp
jne 0x40243d
mov edx, 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, edx
mov ecx, esi
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x4024de
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp + 0x38]
cmp eax, ebp
je 0x40248c
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402483
cmp al, 0xff
je 0x402483
dec al
mov byte [ecx], al
jmp 0x40248c
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x38], ebp
cmp ecx, ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
je 0x4024bb
mov al, byte [ecx - 1]
dec ecx
test al, al
je 0x4024b2
cmp al, 0xff
je 0x4024b2
dec al
mov byte [ecx], al
jmp 0x4024bb
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
lea ecx, [esp + 0x14]
mov dword [esp + 0x218], esi
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x4026c7
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
mov edi, dword [esp + 0x234]
mov esi, dword [sym.imp.WS2_32.dll_recv]
mov byte [esp + 0x218], 6
push ebp
lea eax, [esp + 0x34]
push 1
push eax
push ebx
call esi
cmp eax, ebp
jle 0x402541
mov ecx, dword [esp + 0x30]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator_1
cmp dword [esp + 0x234], ebp
je 0x4024fc
push str._r_n_r_n
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find
test eax, eax
jle 0x4024fc
mov al, byte [esp + 0x30]
cmp al, 0xa
je 0x4024fc
mov byte [edi], al
inc edi
jmp 0x4024fc
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x70], esp
push edx
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0x30]
call fcn.004026f0
push str._r_n_r_n
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::Find
add eax, 4
lea ecx, [esp + 0x10]
push eax
push ebp
call sub.MFC42.DLL_CString::Delete
mov al, byte [esp + 0x1b]
mov dword [esp + 0x48], ebp
mov byte [esp + 0x44], al
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x218], 7
mov eax, dword [ecx - 8]
inc eax
push eax
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x14]
mov ebp, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x44]
mov edx, ecx
mov esi, edi
mov edi, ebp
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x34]
call fcn.00401e90
push ebp
call sub.MFC42.DLL_operatordelete
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
add esp, 4
xor esi, esi
lea eax, [esp + 0x44]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x230]
push edx
push esi
push eax
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_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp + 0x48]
cmp eax, esi
je 0x40262f
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402626
cmp al, 0xff
je 0x402626
dec al
mov byte [ecx], al
jmp 0x40262f
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov byte [esp + 0x218], 5
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x38]
cmp eax, esi
je 0x402671
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402668
cmp al, 0xff
je 0x402668
dec al
mov byte [ecx], al
jmp 0x402671
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x20]
mov dword [esp + 0x38], esi
cmp eax, esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
je 0x4026a2
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x402699
cmp al, 0xff
je 0x402699
dec al
mov byte [ecx], al
jmp 0x4026a2
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x218], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x210]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x20c
ret 0x18