Skip to content

Instantly share code, notes, and snippets.

@x4fx77x4f
Last active January 16, 2024 15:15
Show Gist options
  • Save x4fx77x4f/4fb3f974cd4936c12af1ba017441dc23 to your computer and use it in GitHub Desktop.
Save x4fx77x4f/4fb3f974cd4936c12af1ba017441dc23 to your computer and use it in GitHub Desktop.
Analytics disabler for Teardown.
#define NULL ((void*) 0)
__declspec(dllexport) int hydra5_client_connect_developer(void* _1, void* _2) {
return 1;
}
__declspec(dllexport) int hydra5_client_connect_steam(void* _1, void* _2) {
return 1;
}
__declspec(dllexport) void* hydra5_client_create(void* _1) {
return NULL;
}
__declspec(dllexport) void* hydra5_client_get_kernel_session_id_visual_alias(void* _1) {
return NULL;
}
__declspec(dllexport) void hydra5_disconnect_everything(void) {}
__declspec(dllexport) char* hydra5_get_error_message(int error_code) {
return "cauterizer";
}
__declspec(dllexport) int hydra5_init(void* _1, void* _2, void* _3, void* _4, void* _5, void* _6) {
return 1;
}
__declspec(dllexport) char hydra5_is_executing_requests(void) {
return 0;
}
__declspec(dllexport) void hydra5_telemetry_typed_event(void* _1, void* _2) {}
__declspec(dllexport) void hydra5_term(void) {}
__declspec(dllexport) void hydra5_update(void) {}
void main(void) {}
#!/bin/sh
set -e
cc=x86_64-w64-mingw32-gcc-win32
game="$HOME/.steam/steam/steamapps/common/Teardown"
$cc -c hydra5-x64.c
$cc -shared -o hydra5-x64.dll hydra5-x64.o
rm "$game/hydra5-x64.dll" || :
cp hydra5-x64.dll "$game/hydra5-x64.dll"
chmod -w "$game/hydra5-x64.dll"
@Hedreon
Copy link

Hedreon commented Aug 11, 2023

Windows Instructions:

  1. Install your favorite linux CLI (like MSYS2)

  2. pacman -S mingw-w64-ucrt-x86_64-gcc (whatever your CLI's package manager is, mines pacman) and press Y

  3. Change directory to the folder you created with the same 2 files in it.

  4. Modify make.sh to match the current preferences on your computer. If you we're lucky and got the win32 version of the GCC executable, then you don't have to change the cc variable, but if you're like me and you we're unable to find it, all you have to do is to change it to cc=x86_64-w64-mingw32-gcc. change game to where Teardown is installed, and make sure to change the back slashes (\) to a forward slash (/) or else it wont work!

  5. ./make.sh

(If you find this inaccurate or want this taken down, let me know!)

@TTFH
Copy link

TTFH commented Nov 4, 2023

@imarak2
Copy link

imarak2 commented Jan 16, 2024

clingi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment