Quick Tutorial on how to call the function loadNamedSky() in csgo.
- Open Ida
- Search Strings for: "skybox"
- Find Function
- Get Memory Location of Function
- Define Function in C++ File
- Call With Arguments
Open \Path_to_csgo\bin\engine.dll in Ida
Get Memory Location of Function
using tLoadNamedSky = void(__fastcall*)(const char*); // Create templete of SUB_100AC480
bool loadNamedSky(const char* skyname) {
uintptr_t engine = (uintptr_t)GetModuleHandle(L"engine.dll"); //Get Engine Handle
if (engine == NULL || skyname == NULL) { return false; } // NULL Check
// engine + 0x12f4d0 is the memory location of the function SUB_100AC480
const tLoadNamedSky loadNamedSky = (tLoadNamedSky)(engine + 0x12f4d0); // Create function loadNamedSky
if (loadNamedSky == NULL) { return false; } // NULL Check
loadNamedSky(skyname); // Call the function
return true;
}
int main() {
loadNamedSky("vietnam"); //Load sky vietnam
}