Issuer Check Bypass Against SocialClub (for b2060 to b2802)
-
9 липня 20231.0issuer-check-bypass-against-socialclub_1688929077_348594.zip
Важливо Не для назви моду
Цей мод змінить свою назву з "EXE Integrity Bypass Against RGL" (наступна назва насправді не вирішена, дозвольте мені спочатку глибше зануритися в це питання), яка також буде застосовуватися до архівів починаючи з v1.1. alloc8or розповів нам більш точну інформацію про чому GTA5.exe не вдається перевірити цілісність з socialclub.dll у версіях старіших за збірку гри 2824.
Про
Ця програма ASI обходить/відключає перевірку видавця, яку робить GTA5.exe, що здійснюється шляхом зв'язку з socialclub.dll. У результаті ви можете уникнути відмови гри в запуску з кодом помилки 16, якщо ви використовуєте версію exe старішу, ніж збірка гри 2824. За допомогою цього плагіна ви можете розібрати GTA5.exe для b2699 або старіших, запускаючи робоче ігрове середовище для однієї з версій, де присутня інформація RTTI компілятора. Вам не потрібно використовувати цей ASI для v1.0.2824.0 або новіших, тому що гра взагалі не перевіряє видавця в цих версіях.
Для вашої інформації, ви не можете взагалі пропатчити файл exe за допомогою hex-редактора, оскільки майже вся частина коду гри зашифрована перед запуском гри. Цей ASI не відключає жодних функцій social club, тому ви можете їх використовувати (наприклад, використовуючи своїх персонажів для GTA Online в режимі Director Mode). Ви повинні використовувати цей мод з останнім RGL!
Ви не можете отримати доступ до GTA Online з встановленим завантажувачем ASI починаючи з v1.0.1032.1 (v1.3.9), тому вам не потрібно турбуватися про випадковий доступ до нього.
Не змінюючи код гри, гра перевіряє, чи видавцем socialclub.dll є "Entrust Code Signing Certification Authority — L1D, Entrust Code Signing CA — OVCS1" або "DigiCert SHA2 Assured ID Code Signing CA" на більш ранній стадії (буде викликано під час першого фільму з логотипом Rockstar і лише один раз, перевірка видавця не буде здійснюватися в нових збірках гри). Цей плагін просто забороняє грі реагувати на результат запиту. Схоже, що Rockstar Games почала тестування навіть у версіях Steam та EGS, починаючи з 4 квітня 2023 року (за UTC) найпізніше.
Що змусило вас створити це, а не alloc8or?
По-перше, alloc8or міг би створити такий інструмент, якби ця проблема почала виникати для всіх, хто намагається використовувати не останню версію до першої половини 2022 року, але він не був таким активним у модингу GTA з початку 2023 року. Інший блискучий розробник, який добре знайомий з комп'ютерною наукою, став неактивним, як і MulleDK19 (який є одним із розробників, який створив RAGE Plugin Hook і неактивний з травня 2021 року). Хоча жоден з них не надав вихідні коди своїх робіт або не обфускував свій код (щодо обфускації, я впевнений, що роботи MulleDK19 або LMS постраждали, але, можливо, не у випадку з alloc8or).
По-друге, обговорення піратських матеріалів заборонено на 5Mods, і деякий модератор мовчки видалив одне з моїх повідомлень, яке невинно містило інформацію про те, як обійти цю перевірку за допомогою піратського контенту в 5Mods Discord.
З цих причин я подумав, що мені слід створити цю програму, щоб надати чистий спосіб, який буде дозволено обговорювати, і це полегшить нам перевірку старих версій за допомогою дизасемблера без допомоги забрудненого/брудного матеріалу (і мені знадобиться цей інструмент, щоб додати тонни розширених функцій у ScriptHookVDotNet, де я є керівником проекту з травня 2023 року). Я спробував створити це і зумів зробити це приблизно за 6 годин, включаючи просту систему журналювання та просте тестування на сумісність.
Встановлення
Просто перетягніть ExeIntegrityBypassAgainstRGL.asi у папку Grand Theft Auto V.
Ви можете побачити ExeIntegrityBypassAgainstRGL.log створений або оновлений, якщо ASI працює і exe має дозвіл на запис у кореневу папку (не оновлюватиме журнал, якщо дозволу недостатньо, оскільки ведення журналу не є обов'язковим).
Вам знадобляться відповідні файли update.rpf (принаймні відповідні файли сценаріїв ysc) для GTA5.exe, який ви плануєте використовувати (наприклад, update.rpf для збірки гри 2699 для b2699 GTA5.exe), оскільки хеші для власних функцій фактично змінюються в більшості оновлень (але немає оновлення хешу власних функцій між b2612 і b2699 принаймні).
Вимоги
Завантажувач ASI. Script Hook V не потрібен.
Хоча для цього потрібно Visual C++ Redistributable 2019+ для запуску, ви повинні вже встановити Visual C++ Redistributable 2019, коли ви встановлювали Rockstar Games Launcher.
Примітка
Щоб уникнути виконання невиправленого коду, ця програма спробує виправити за допомогою іншого потоку, і створений потік буде утримувати основний потік призупиненим, поки виправлення не буде завершено (насправді yoinked з GTAVLauncherBypass, але я змінив код, щоб призупинити лише один потік). Отже, якщо виправлення виконано наполовину, гра може не запускатися нескінченно.
Якщо Rockstar виправити цей інструмент, навіть не запускаючи процес GTA5.exe, якщо exe не є найновішим, цей інструмент нічого не зможе зробити, оскільки інструмент не може бути завантажений у цьому випадку (я сумніваюся, що це станеться, оскільки перевірка видавця менш обмежена в пізніших збірках гри відповідно до того, що сказав alloc8or у вищезгаданому стані).
Після завершення роботи з виправленням ASI від’єднається від GTA5.exe і більше не займатиме пам’ять і не матиме блокування для файлу ASI (стиль Ninja!), дозволяючи вам видалити файл ASI під час роботи гри, якщо вам цікаво.
Цей інструмент підтримує всі версії, які використовують Rockstar Games Launcher (перевірено на b2060, b2372, b2699 та b2802 версії Steam), але він не підтримує жодні версії, які використовують стару систему Social Club (тому цей інструмент не виконує роботу в b1868 або раніше). Ви можете використовувати цей інструмент у v2824 або новіших версіях, але цей інструмент не пропонує нічого значущого, ніж повна ванільна гра в цьому випадку, оскільки перевірка видавця взагалі не існує в цих версіях.
Вихідний код
Можна знайти на GitHub, який ліцензовано за ліцензією BSD Zero Clause License, де ви можете робити практично все проти вихідного коду, але не публічне оголошення (тому деякі сторони, такі як Google, можуть використовувати деякі частини коду) і без відповідальності та гарантії.
Я не хочу тримати цю річ у секреті або захищати авторським правом. Деяка частина вихідного коду є надлишковою (у v1.0), оскільки я зробив цей інструмент трохи поспіхом.
Від kagikn
Important Not for the Mod Name
This mod will be changing its name from "EXE Integrity Bypass Against RGL" (the next name has not been decided actually, let me dig into the issue more first), which will also be applied to archives since v1.1. alloc8or told us more accurate info about why GTA5.exe fails to check the integrity against socialclub.dll in versions older than the game build 2824.
About
This ASI program bypasses/disables the issuer check that GTA5.exe does, which is done by communicating with socialclub.dll. As a result, you can avoid the game refusing to start with the error code 16 for using a version of the exe older than the game build 2824. With this plugin, you can disassemble GTA5.exe for b2699 or older while running working game environments for one of the versions, where compiler's RTTI info is present. You don't need to use this ASI for v1.0.2824.0 or newer ones, because the game don't check the issuer at all in those versions.
For your information, you cannot patch the exe file with a hex editor at all because almost all part of the game code is encrypted before the launch of the game. This ASI does not disable any social club features, so you can use them (e.g. using your characters for GTA Online in the Director Mode). You should use this mod with the latest RGL!
You can't access GTA Online with the ASI loader installed since v1.0.1032.1 (v1.3.9), so you don't need to worry about accessing it by accident.
Without modifying the game code, the game tests if the issuer of socialclub.dll is either "Entrust Code Signing Certification Authority — L1D, Entrust Code Signing CA — OVCS1", or "DigiCert SHA2 Assured ID Code Signing CA" at a earlier stage (will be called during the first Rockstar logo movie and only once, the issuer check won't be done in newer game builds). This plugin just prevents the game from listening to the query result. Looks like Rockstar Games started testing even in Steam and EGS versions starting from April 4th 2023 (in UTC) at the latest.
What made you create this and not alloc8or?
Firstly, alloc8or could make this kind of tool if this issue started to happen for everyone who tries to use a non-latest version until the first half of 2022, but he hasn't been active in GTA modding that much since the beginning of 2023. Another brilliant dev who is familiar with computer science so much got inactive, just like MulleDK19 (who is one of the developers who made RAGE Plugin Hook and has been inactive since May 2021). Neither of them provided source codes of their works or obfuscated their code though (for obfuscation I'm sure works of MulleDK19 or LMS are affected but maybe not the case for alloc8or's).
Secondly, discussing pirating stuff is not allowed in 5Mods and some moderator silently deleted one of my massage that innocently included how to bypass this check with pirated stuff in the 5Mods Discord.
For those reasons, I thought I should create this program to provide a clean way that will be allowed to discuss and this will make us easier to inspect old versions using a disassembler without the help of tainted/dirty stuff (and I will need this tool to add tons of advanced features in ScriptHookVDotNet too, where I am the project lead since May 2023). I tried to create this and managed to do like in 6 hours including the simple log system and a simple testing for compatibility.
Installation
Simply drop ExeIntegrityBypassAgainstRGL.asi into your Grand Theft Auto V folder.
You can see ExeIntegrityBypassAgainstRGL.log created or updated if the ASI runs and the exe has the permission to write to the root folder (won't update the log if the permission is insufficient as logging is not mandatory).
You will need appropriate update.rpf files (at least appropriate ysc script files) for the GTA5.exe you are planning to use (e.g. update.rpf for game build 2699 for the b2699 of GTA5.exe) because hashes for native functions are actually changed in most updates (but no native hash update between b2612 and b2699 at least).
Requirements
The ASI loader. Script Hook V is not needed.
Although this requires Visual C++ Redistributable 2019+ to run, You should have Visual C++ Redistributable 2019 installed already when you installed Rockstar Games Launcher.
Note
To avoid executing the unpatched code, this program will try to patch with another thread and the created thread will keep the main thread suspended until the patch completes (actually yoinked from GTAVLauncherBypass but I changed the code to suspend only one thread). So if the patch fails half done, the game may not get started infinitely.
If Rockstar patch this tool by not even launching a process of GTA5.exe if the exe is not the latest one, this tool can do nothing since the tool can't be loaded in that case (I doubt that will happen since the issuer check is less restricted in later game builds according to what alloc8or said in the above state).
After the patch job is finished, the ASI will detach itself from GTA5.exe and will not occupy the memory or have the lock for the ASI file any longer (Ninja style!), letting you remove the ASI file while the game is running in case you are wondering.
This tool supports all the versions that use Rockstar Games Launcher (tested in b2060, b2372, b2699, and b2802 of Steam version), but this does not support any versions that use the old Social Club system (so this tool doesn't do the job in b1868 or earlier). You can use this tool in v2824 or newer, but this tool does not offer anything meaningful than the complete vanilla game in that case since the issuer check doesn't exist at all in those versions.
Souce Code
Can be found on GitHub, which is licensed under BSD Zero Clause License, where you can do basically anything against the source code but not a public domain dedication (so some parties such as Google can use some piece of code) and without liability and warranty.
I don't want to keep this thing secret or protected with copyright. Some part of source code is redundant (in v1.0) since I made this tool in a bit of a hurry.
By kagikn