file<<"\t__declspec(naked) void __stdcall "<<"PROXY_"<<i<<"() { //"<<names[i]<<endl;//declspec naked stdcall translates to _PROXY_<i>@0 when mangled; and mangled proxy functions somehow means exports retain their name exactly as defined which is what we need
file<<"\t\t__asm"<<endl<<"\t\t {";
file<<"\t\t\tjmp p["<<i<<" * 4]"<<endl;
file<<"\t\t}"<<endl;
file<<"\t}"<<endl;
}
}
file<<"}"<<endl;
file.close();
}
voidGenerateASM(stringname)
{
std::fstreamfile;
file.open(name+"a.asm",std::ios::out);//append suffix "a" to avoid .obj files clashing when compiling with msvc