تجاوز فحص المُصدر مقابل SocialClub (للإصدارات من b2060 إلى b2802)
-
9 يوليو 20231.0issuer-check-bypass-against-socialclub_1688929077_348594.zip
ملاحظة هامة ليست لاسم المود
سيتم تغيير اسم هذا المود من "EXE Integrity Bypass Against RGL" (الاسم التالي لم يتم تحديده بعد، دعوني أبحث في المشكلة أولاً)، والذي سيتم تطبيقه أيضًا على الأرشيفات منذ الإصدار 1.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 في وضع المخرج). يجب عليك استخدام هذا المود مع أحدث RGL!
لا يمكنك الوصول إلى GTA Online مع تثبيت ASI loader منذ الإصدار 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 (بالتوقيت العالمي المنسق) على أبعد تقدير.
ما الذي جعلك تنشئ هذا وليس alloc8or؟
أولاً، كان بإمكان alloc8or إنشاء هذا النوع من الأدوات إذا بدأت هذه المشكلة في الحدوث لكل من يحاول استخدام إصدار غير الأحدث حتى النصف الأول من عام 2022، لكنه لم يكن نشطًا في تعديل GTA كثيرًا منذ بداية عام 2023. مطور آخر لامع مطلع على علوم الكمبيوتر كثيرًا أصبح غير نشط، تمامًا مثل MulleDK19 (وهو أحد المطورين الذين صنعوا RAGE Plugin Hook وأصبح غير نشط منذ مايو 2021). لم يقدم أي منهما أكواد المصدر لأعمالهما أو قام بتعتيم أكوادهما (بالنسبة للتعتيم أنا متأكد أن أعمال MulleDK19 أو LMS متأثرة ولكن ربما ليس هو الحال بالنسبة لأعمال alloc8or).
ثانياً، مناقشة الأشياء المقرصنة غير مسموح بها في 5Mods وقام أحد المشرفين بحذف إحدى رسائلي بصمت والتي تضمنت بشكل بريء كيفية تجاوز هذا الفحص باستخدام أشياء مقرصنة في Discord 5Mods.
لهذه الأسباب، اعتقدت أنه يجب علي إنشاء هذا البرنامج لتوفير طريقة نظيفة يُسمح بمناقشتها وهذا سيجعلنا أسهل في فحص الإصدارات القديمة باستخدام مفك التجميع دون مساعدة من الأشياء الملوثة/غير النظيفة (وسأحتاج إلى هذه الأداة لإضافة الكثير من الميزات المتقدمة في 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 loader. Script Hook V غير مطلوب.
على الرغم من أن هذا يتطلب Visual C++ Redistributable 2019+ للتشغيل، يجب أن يكون لديك Visual C++ Redistributable 2019 مثبتًا بالفعل عند تثبيت Rockstar Games Launcher.
ملاحظة
لتجنب تنفيذ الرمز غير المرقّع، سيحاول هذا البرنامج تطبيق الرقعة باستخدام مؤشر ترابط آخر وسيحافظ مؤشر الترابط الذي تم إنشاؤه على المؤشر الرئيسي معلّقًا حتى اكتمال الرقعة (تم أخذ ذلك فعليًا من GTAVLauncherBypass ولكني غيرت الرمز لتعليق مؤشر ترابط واحد فقط). لذلك إذا فشلت الرقعة في المنتصف، فقد لا تبدأ اللعبة إلى ما لا نهاية.
إذا قامت Rockstar بترقيع هذه الأداة عن طريق عدم تشغيل عملية GTA5.exe على الإطلاق إذا لم يكن exe هو الأحدث، فلن تتمكن هذه الأداة من فعل أي شيء في هذه الحالة حيث لا يمكن تحميل الأداة (أشك في حدوث ذلك نظرًا لأن فحص المُصدر أقل تقييدًا في إصدارات اللعبة اللاحقة وفقًا لما قاله alloc8or في الحالة المذكورة أعلاه).
بعد الانتهاء من مهمة الرقعة، سيقوم ASI بفصل نفسه عن GTA5.exe ولن يشغل الذاكرة أو يمتلك قفل ملف ASI بعد الآن (بأسلوب النينجا!)، مما يتيح لك إزالة ملف ASI أثناء تشغيل اللعبة إذا كنت تتساءل.
تدعم هذه الأداة جميع الإصدارات التي تستخدم Rockstar Games Launcher (تم اختبارها في b2060، b2372، b2699، و b2802 من إصدار Steam)، ولكنها لا تدعم أي إصدارات تستخدم نظام Social Club القديم (لذلك لا تعمل هذه الأداة في b1868 أو الأقدم). يمكنك استخدام هذه الأداة في الإصدار v2824 أو الأحدث، ولكن هذه الأداة لا تقدم أي شيء ذي معنى أكثر من اللعبة الأصلية الكاملة في هذه الحالة حيث لا يوجد فحص للمُصدر على الإطلاق في تلك الإصدارات.
كود المصدر
يمكن العثور عليه على GitHub، وهو مرخص بموجب ترخيص BSD Zero Clause، حيث يمكنك فعل أي شيء أساسيًا ضد كود المصدر ولكن ليس تخصيصًا للملكية العامة (لذلك يمكن لبعض الجهات مثل Google استخدام جزء من الكود) وبدون مسؤولية وضمان.
لا أريد الاحتفاظ بهذا الشيء سراً أو محمياً بحقوق الطبع والنشر. بعض أجزاء كود المصدر زائدة (في الإصدار 1.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