ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 3043

NiNJA released protection code for lobby crash! (Destroyer, SVT v17, etc.)

by LLJGZVHGGQXLZE - 09-29-2020 - 03:25 AM
#1
~~ https://paste.ee/p/i42Vp ~~



Code:
/* ~ Toxic lobby crash protection code made public by NiNJA ~
This protects against Destroyer BR, SVT v17, and whoever else copied the public crash from DF and pasted in their menu. Anyone who added this to their menu should be ashamed, it ruins every single retail user's experience, and now it won't work against updated menus. NiNJA will never add this crash, neither should you. Menus with this crash should remove it and stop being actual pieces of shit. */

// registers and functions remain unlabeled in the public release, this is on purpose
bool player_block_list[18];
static bool(*crash_patch_1_t)(void*, unsigned char*, unsigned long, unsigned short, unsigned short, unsigned long, unsigned long, int);
static unsigned long(*crash_patch_2_t)(void*, unsigned char*, unsigned long, unsigned short, unsigned short, unsigned long, unsigned long, int);
static bool(*crash_patch_3_t)(void*, unsigned char*, unsigned long, unsigned short, unsigned long);
static void(*crash_patch_4_t)(void*, unsigned short*, bool, unsigned char*, unsigned long);
static void(*crash_patch_5_t)(void*, void*, void*, unsigned char*, unsigned long, unsigned long, unsigned long, unsigned long);
static void(*crash_patch_6_t)(unsigned char*);

// this blocks multiple heap overruns that happen when the crash is activated
bool crash_patch_0(void* r3, unsigned long* r4, unsigned long r5, unsigned long r6) {
unsigned long lr = NULL;
__asm { mflr lr };
bool ret = ((bool(*)(void*, unsigned long*, unsigned long, unsigned long))0x826275D0)(r3, r4, r5, r6);
if (lr == 0x830229DC && *r4 > 8) {
*r4 = NULL;
}
if (lr == 0x8302BCEC && *r4 > 10) {
*r4 = NULL;
}
if (lr == 0x830BABA4 && *r4 > 1) {
*r4 = NULL;
}
return ret;
}
// this blocks bad objects
bool crash_patch_1(void* r3, unsigned char* r4, unsigned long r5, unsigned short r6, unsigned short r7, unsigned long r8, unsigned long r9, int r10) {
unsigned char pid = r4[0x29];
if (pid >= 0x00 && pid < 0x10) {
if (player_block_list[pid]) {
return false;
}
if (r6 < 0 || r6 > 13) {
player_block_list[pid] = true;
return false;
}
}
return crash_patch_1_t(r3, r4, r5, r6, r7, r8, r9, r10);
}
// this blocks bad objects
unsigned long crash_patch_2(void* r3, unsigned char* r4, unsigned long r5, unsigned short r6, unsigned short r7, unsigned long r8, unsigned long r9, int r10) {
unsigned char pid = r4[0x29];
if (pid >= 0x00 && pid < 0x10) {
if (player_block_list[pid]) {
return 6;
}
if (r6 < 0 || r6 > 13) {
player_block_list[pid] = true;
return 6;
}
}
return crash_patch_2_t(r3, r4, r5, r6, r7, r8, r9, r10);
}
// this blocks bad objects
bool crash_patch_3(void* r3, unsigned char* r4, unsigned long r5, unsigned short r6, unsigned long r7) {
unsigned char pid = r4[0x29];
if (pid >= 0x00 && pid < 0x10) {
if (player_block_list[pid]) {
return false;
}
}
return crash_patch_3_t(r3, r4, r5, r6, r7);
}
// this blocks bad objects
void crash_patch_4(void* r3, unsigned short* r4, bool r5, unsigned char* r6, unsigned long r7) {
if (!r5) {
unsigned char pid = r6[0x29];
if (pid >= 0x00 && pid < 0x10) {
if (player_block_list[pid]) {
return;
}
if (r4[0x1B] < 0 || r4[0x1B] > 13) {
player_block_list[pid] = true;
return;
}
}
crash_patch_4_t(r3, r4, r5, r6, r7);
}
}
// this blocks bad events
void crash_patch_5(void* r3, void* r4, void* r5, unsigned char* r6, unsigned long r7, unsigned long r8, unsigned long r9, unsigned long r10) {
unsigned char pid = r6[0x29];
if (pid >= 0x00 && pid < 0x10) {
if (player_block_list[pid]) {
*(unsigned long*)(0x83E373AC) = NULL;
return;
}
}
crash_patch_5_t(r3, r4, r5, r6, r7, r8, r9, r10);
}
// this removes the block
void crash_patch_6(unsigned char* r3) {
unsigned char pid = r3[0x29];
if (pid >= 0x00 && pid < 0x10) {
player_block_list[pid] = false;
}
crash_patch_6_t(r3);
}


*(unsigned long*)(0x820A259C) = 0x82D9F6E0;
*(unsigned long*)(0x820A25A0) = 0x833E7940;
*(unsigned long*)(0x820A331C) = 0x82D9F6E0;
*(unsigned long*)(0x820A3320) = 0x833E7940;
*(unsigned long*)(0x82028580) = (unsigned long)(crash_patch_0);
HookFunction(0x830C4398, &crash_patch_1, &crash_patch_1_t);
HookFunction(0x83068690, &crash_patch_2, &crash_patch_2_t);
HookFunction(0x83068A60, &crash_patch_3, &crash_patch_3_t);
HookFunction(0x830EA8B8, &crash_patch_4, &crash_patch_4_t);
HookFunction(0x835DB018, &crash_patch_5, &crash_patch_5_t);
HookFunction(0x82FEA388, &crash_patch_6, &crash_patch_6_t);
This account is currently banned
Ban reason: multi
Reply
#2
This thread was removed from view to be cleaned please know before you make a reply to this thread flaming will not be tolerated on Demon Forums and you may be warned or banned for doing so
Reply
#3
Quality thread, much appreciate it, this works flawlessly ~ gg NiNJA!
Reply
#4
anyone already tried this? it actually works?
Reply
#5
wow thanks ninja, it works great ?
Reply
#6
lol, ninja is tryna take svt out the scene lol skidrow cmon dont you guys got a job irl? or you all just living in your own misery and wanna be toxic, im just saying #makemodding on gta5 fun again
Reply
#7
(09-30-2020 - 07:39 AM)SystemEngineer Wrote: lol, ninja is tryna take svt out the scene lol skidrow cmon dont you guys got a job irl? or you all just living in your own misery and wanna be toxic, im just saying #makemodding on gta5 fun again
these protections are working. why are you spamming this thread and flaming?
Harley Quinn
Reply
#8
Great prorection! And SystemEngineer, SKiDROW is actually messing chip and he's toxic community over. They think they got the power over everything all because they use SVT
Reply
#9
~ new official paste as the old one was removed ~

https://ghostbin.co/paste/ejwdqhs
Reply
#10
(10-10-2020 - 11:08 PM)abzy678 Wrote: ~ new official paste as the old one was removed ~

https://ghostbin.co/paste/ejwdqhs
^

you might need to click this link twice, especially on mobile, because of their Cloudflare settings. but the paste is up to date and code is working fine!
Reply

Users browsing: 2 Guest(s)