Function at 0x407c00
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp 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
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4092ca
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x23c
push esi
push edi
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x407c63
lea eax, [ebp - 0x1e0]
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x407c63
xor eax, eax
jmp 0x4081bc
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov dword [ebp - 0x28], eax
push 0xf
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov byte [ebp - 0x41], 0
mov word [ebp - 0x20], 2
push 0x50
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x1e], ax
lea ecx, [ebp - 0x50]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x1c], eax
push 0
push 0
push 0
push 0
push 0x10
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.WS2_32.dll_WSAConnect]
test eax, eax
je 0x407ce1
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
xor eax, eax
jmp 0x4081bc
mov dl, byte [ebp - 0x1f0]
mov byte [ebp - 0x3c], dl
push 0
lea ecx, [ebp - 0x3c]
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, str.GET__
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
mov dword [ebp - 0x200], ecx
push 1
mov eax, dword [ebp - 0x200]
push eax
lea ecx, [ebp - 0x3c]
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_]
and eax, 0xff
test eax, eax
je 0x407d5f
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x1fc], ecx
mov ecx, dword [ebp - 0x200]
mov esi, str.GET__
mov edi, dword [ebp - 0x1fc]
mov edx, ecx
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 [ebp - 0x200]
push eax
lea ecx, [ebp - 0x3c]
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_]
mov dword [ebp - 4], 0
mov edi, dword [ebp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x3c]
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 dword [ebp - 0x204], eax
mov edi, str._HTTP_1.0_nHost:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
mov dword [ebp - 0x210], ecx
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 eax, dword [edx]
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x210]
ja 0x407db9
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp dword [ebp - 0x210], 0
jbe 0x407e27
push 0
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x210]
mov dword [ebp - 0x208], ecx
mov edx, dword [ebp - 0x208]
push edx
lea ecx, [ebp - 0x3c]
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_]
and eax, 0xff
test eax, eax
je 0x407e27
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x20c], eax
mov ecx, dword [ebp - 0x210]
mov esi, str._HTTP_1.0_nHost:
mov edi, dword [ebp - 0x20c]
mov edx, ecx
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 [ebp - 0x208]
push eax
lea ecx, [ebp - 0x3c]
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_]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
mov dword [ebp - 0x21c], ecx
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 edx, dword [ecx]
sub edx, dword [ebp - 0x34]
cmp edx, dword [ebp - 0x21c]
ja 0x407e55
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp dword [ebp - 0x21c], 0
jbe 0x407ec1
push 0
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x21c]
mov dword [ebp - 0x214], eax
mov ecx, dword [ebp - 0x214]
push ecx
lea ecx, [ebp - 0x3c]
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_]
and eax, 0xff
test eax, eax
je 0x407ec1
mov edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x34]
mov dword [ebp - 0x218], edx
mov ecx, dword [ebp - 0x21c]
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x218]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x214]
push ecx
lea ecx, [ebp - 0x3c]
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_]
mov edi, 0x40ca58
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xffffffff
mov dword [ebp - 0x228], ecx
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 eax, dword [edx]
sub eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x228]
ja 0x407ef1
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp dword [ebp - 0x228], 0
jbe 0x407f5f
push 0
mov ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x228]
mov dword [ebp - 0x220], ecx
mov edx, dword [ebp - 0x220]
push edx
lea ecx, [ebp - 0x3c]
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_]
and eax, 0xff
test eax, eax
je 0x407f5f
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x224], eax
mov ecx, dword [ebp - 0x228]
mov esi, 0x40ca58
mov edi, dword [ebp - 0x224]
mov edx, ecx
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 [ebp - 0x220]
push eax
lea ecx, [ebp - 0x3c]
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_]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp - 0x22c]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x38], 0
jne 0x407f84
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 dword [ebp - 0x240], eax
jmp 0x407f8d
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x240], ecx
mov edx, dword [ebp - 0x240]
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x10]
jge 0x408095
push 0
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x40]
add edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov dword [ebp - 0x1e4], eax
cmp dword [ebp - 0x1e4], 0
jg 0x408084
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [ebp - 0x1f4], 0
mov dword [ebp - 4], 0xffffffff
mov edx, 1
test edx, edx
je 0x408000
cmp dword [ebp - 0x38], 0
jne 0x408002
jmp 0x408064
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mov cl, byte [eax - 1]
test ecx, ecx
je 0x40801d
mov edx, dword [ebp - 0x38]
xor eax, eax
mov al, byte [edx - 1]
cmp eax, 0xff
jne 0x408046
mov ecx, dword [ebp - 0x30]
add ecx, 2
mov dword [ebp - 0x234], ecx
mov edx, dword [ebp - 0x38]
sub edx, 1
mov dword [ebp - 0x230], edx
mov eax, dword [ebp - 0x230]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x408064
mov ecx, dword [ebp - 0x38]
sub ecx, 1
mov dword [ebp - 0x244], ecx
mov edx, dword [ebp - 0x244]
mov al, byte [edx]
sub al, 1
mov ecx, dword [ebp - 0x244]
mov byte [ecx], al
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x1f4]
jmp 0x4081bc
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0x1e4]
mov dword [ebp - 0x24], edx
jmp 0x407f9d
mov eax, dword [ebp + 0x10]
and eax, 0xffff
test eax, eax
je 0x4080a7
cmp dword [ebp + 0x14], 0
jg 0x4080b7
mov dword [ebp + 0x14], 2
lea ecx, [ebp - 0x1e8]
mov dword [ebp + 0x10], ecx
mov dword [ebp - 0x24], 0
mov edx, dword [ebp + 0x14]
sub edx, 1
mov dword [ebp + 0x14], edx
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp + 0x14]
jge 0x408108
push 0
mov ecx, dword [ebp + 0x14]
sub ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.WSOCK32.dll_recv]
mov dword [ebp - 0x1ec], eax
cmp dword [ebp - 0x1ec], 0
jg 0x4080fa
jmp 0x408108
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x1ec]
mov dword [ebp - 0x24], ecx
jmp 0x4080c7
mov edx, dword [ebp + 0x10]
add edx, dword [ebp - 0x24]
mov byte [edx], 0
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
mov dword [ebp - 0x1f8], 1
mov dword [ebp - 4], 0xffffffff
mov ecx, 1
test ecx, ecx
je 0x40813b
cmp dword [ebp - 0x38], 0
jne 0x40813d
jmp 0x4081a1
mov edx, dword [ebp - 0x38]
xor eax, eax
mov al, byte [edx - 1]
test eax, eax
je 0x408159
mov ecx, dword [ebp - 0x38]
xor edx, edx
mov dl, byte [ecx - 1]
cmp edx, 0xff
jne 0x408182
mov eax, dword [ebp - 0x30]
add eax, 2
mov dword [ebp - 0x23c], eax
mov ecx, dword [ebp - 0x38]
sub ecx, 1
mov dword [ebp - 0x238], ecx
mov edx, dword [ebp - 0x238]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4081a1
mov eax, dword [ebp - 0x38]
sub eax, 1
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x248]
mov dl, byte [ecx]
sub dl, 1
mov eax, dword [ebp - 0x248]
mov byte [eax], dl
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x1f8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret