Jump to content

[REL/OpenSrc] GTA ASI Injector


The_GTA

Recommended Posts

^The game will sill require ScriptHook.dll lol so you're out of luck.

 

And I'm not sure this tool works well at all with Patch 8, gives WTV270 error when without any XLiveLess (tested with RIL.Budgeted and ColAccel which are Patch 8 compatible). Works just fine with Patch 7 though.

Edited by Tomasino
Link to comment
Share on other sites

^The game will sill require ScriptHook.dll lol so you're out of luck.

 

And I'm not sure this tool works well at all with Patch 8, gives VDS10 error with XLiveLess and WTV270 without (tested with RIL.Budgeted and ColAccel which are Patch 8 compatible). Works just fine with Patch 7 though.

ScriptHook (aru) based hacks will require it, yes :)

 

Patch 8 has improved anti-cheat (I heard). R* has gone mad. When IV's on sale I will buy it to check.

Link to comment
Share on other sites

Turns out it doesn't work for Patch 7 too if any XLiveLess isn't used (WS10 error), looks like it works with Patch 8 if both "GTA IV tool" and xliveless from here are used.

Link to comment
Share on other sites

Patch 8 has improved anti-cheat (I heard). R* has gone mad. When IV's on sale I will buy it to check.

The only anti-cheat the game has is detecting whether or not you've modified any data/texture files (which doesn't apply to TLAD/TBOGT for some reason and also IMG archives are excluded from this check regardless if it's IV/episode), from which then it separates you into mod only lobbies and prevents you from playing Ranked Match until you remove it/get original files back. Nothing's changed.

Edited by B Dawg
Link to comment
Share on other sites

  • 3 weeks later...

How to inject CLEO 4.1?

confirmed working, GTA 1.0 + all CLEO files in GTA folder.

 

p3P7y99m.png

 

pefrmdllembed.exe GTA_SA.EXE CLEO.asi CLEO_SA.EXE

 

if you face issues please post with more information here.

Link to comment
Share on other sites

Nice mod bro.But can u make this mod for FLA support.

I mean to say is that can Make the exe to load the other added asi data from another file.Like gta-sa.dat or what ever.It may make the FLA work with this mod.Cause FLA got some exe limits.If u do that the main exe size would remain the same but your work will also be done..

But I know programming isn't so easy so...I was just suggesting.Never hurts to dream....

 

Edit:Solved.

Edited by inan.ahammad
Link to comment
Share on other sites

Rachel Amber

i have problem with this when i try it it says for me "failed to load executable image" i want do it on already custom exe. Also what about a asi's that have an ini file for customization?

Edited by NOskillx
Link to comment
Share on other sites

i have problem with this when i try it it says for me "failed to load executable image" i want do it on already custom exe. Also what about a asi's that have an ini file for customization?

I have reseated it today...and it's working.And as for the ini configuration file it remains the same.This tool just puts the asi code in the exe nothing more.So no changes made.So the ini file will work as if it would work on the asi plugin...No need to rename it or do any changes to it but it will still me necessary cause the exe will now load it instead of the asi plugin.
Link to comment
Share on other sites

Will this tool change the priority of the asi files.I mean with the normal exe and the asi files the game loads the files as plugins.So there is no chance of giving one bigger priority than another.But if I place the code of one asi file in the exe what will happen then.If the game will give the asi code the bigger priority than others which are just included as asi file..

Link to comment
Share on other sites

I injected some asi in SA. Almost every script worked except a couple.

 

 

✔ - Works, ✘ - Doesn't work

Advanced Aiming ✔
BlackRoadFix ✔
ImFast ✘
ImVehFt ✔
OLA ✘
Triangle Radar ✔
IMFX ✔
Extended Gang Wars ✔
SAWindowed by ModelingMan ✔
MobileSpecualrReflection ✔
Custom Plate Format ✔

 

Link to comment
Share on other sites

I injected some asi in SA. Almost every script worked except a couple.

 

 

✔ - Works, ✘ - Doesn't work

 

Advanced Aiming ✔

BlackRoadFix ✔

ImFast ✘

ImVehFt ✔

OLA ✘

Triangle Radar ✔

IMFX ✔

Extended Gang Wars ✔

SAWindowed by ModelingMan ✔

MobileSpecualrReflection ✔

Custom Plate Format ✔

 

The Limit Adjusters Won't work as well as the asi files that need to be started before the game starts...
Link to comment
Share on other sites

The Limit Adjusters Won't work as well as the asi files that need to be started before the game starts...

 

I injected some asi in SA. Almost every script worked except a couple.

 

 

✔ - Works, ✘ - Doesn't work

 

Advanced Aiming ✔

BlackRoadFix ✔

ImFast ✘

ImVehFt ✔

OLA ✘

Triangle Radar ✔

IMFX ✔

Extended Gang Wars ✔

SAWindowed by ModelingMan ✔

MobileSpecualrReflection ✔

Custom Plate Format ✔

 

 

I know how to fix OLA support. Still working on "bugfix".

 

Will this tool change the priority of the asi files.I mean with the normal exe and the asi files the game loads the files as plugins.So there is no chance of giving one bigger priority than another.But if I place the code of one asi file in the exe what will happen then.If the game will give the asi code the bigger priority than others which are just included as asi file..

For example you have asi SilentPatchSA and skygfx. If you do

 

prefrmdllembed.exe SilentPatchSA.asi skygfx.asi GTA_SA.EXE

 

SilentPatchSA runs first, skygfx runs second.

 

With pefrmdllembed you have control over loading order :)

Link to comment
Share on other sites

 

The Limit Adjusters Won't work as well as the asi files that need to be started before the game starts...

I injected some asi in SA. Almost every script worked except a couple.

 

 

✔ - Works, ✘ - Doesn't work

 

Advanced Aiming ✔

BlackRoadFix ✔

ImFast ✘

ImVehFt ✔

OLA ✘

Triangle Radar ✔

IMFX ✔

Extended Gang Wars ✔

SAWindowed by ModelingMan ✔

MobileSpecualrReflection ✔

Custom Plate Format ✔

 

I know how to fix OLA support. Still working on "bugfix".

 

Will this tool change the priority of the asi files.I mean with the normal exe and the asi files the game loads the files as plugins.So there is no chance of giving one bigger priority than another.But if I place the code of one asi file in the exe what will happen then.If the game will give the asi code the bigger priority than others which are just included as asi file..

For example you have asi SilentPatchSA and skygfx. If you do

 

prefrmdllembed.exe SilentPatchSA.asi skygfx.asi GTA_SA.EXE

 

SilentPatchSA runs first, skygfx runs second.

 

With pefrmdllembed you have control over loading order :)

Really thanks bro...I really needed a tool like this...Loading FLA at last will give me much help.
Link to comment
Share on other sites

Claude_Lib

Now we can LITERALLY SilentPatch EXEs.

But the resulting exe will include both the original (broken) code and the fixed one. This is not patching.
Link to comment
Share on other sites

Really thanks bro...I really needed a tool like this...Loading FLA at last will give me much help.

Just released version 1.1! New commandline option "-efix". For example...

 

pefrmdllembed.exe -efix GTA_SA.EXE modloader.asi GTA_SA_ML.EXE

 

This will put back old entry point address at launch so that version detection will work. The catch: this fix works for the first ASI only. More powerful fix will come later.

 

 

But the resulting exe will include both the original (broken) code and the fixed one. This is not patching.

Such a purist opinion :p

 

In my opinion this is the best patching you can do considering compatibility with every other ASI.

 

=================

Download new version from: https://osdn.net/projects/pefrm-units/downloads/67523/gta_asi_injector.zip/

Edited by The_GTA
  • Like 2
Link to comment
Share on other sites

Nice Work👍

But can u make a GUI for this tool.It will help those who can't do it manually.

Link to comment
Share on other sites

I would love to have a GUI too. Can someone explain me how do I get access to the command line? I'm really confused.

  • Like 2
Link to comment
Share on other sites

 

Now we can LITERALLY SilentPatch EXEs.

But the resulting exe will include both the original (broken) code and the fixed one. This is not patching.That's GTAV patching :D Still counts!
Link to comment
Share on other sites

I would love to have a GUI too. Can someone explain me how do I get access to the command line? I'm really confused.

The manual is very simple:

1) Into any folder (folder on the desktop do not need to create) we throw gta_sa.exe, pefrmdllembed.exe and the necessary plugins..

2) For those who forgot the DOS commands:

Being inside the folder, press the Shift key and right-click in the context menu select Open command window here.

You can also right-click on any folder and select the item Open command window here in the context menu.

3)Next, on the command line, enter command line with spaces as in the fifth (5) item of Readme

 

My example: pefrmdllembed.exe -efix GTA_SA.EXE modloader.asi EffectLoader.asi GTA_SA_ML_EL.EXE

 

p.s. By the way the plugin GFXHack.asi also does not work (also check the version of the exe) :monocle:

Found a solution: in the game directory must be saved the original gta_sa.exe 14047kb

Edited by ural
  • Like 2
Link to comment
Share on other sites

I would love to have a GUI too. Can someone explain me how do I get access to the command line? I'm really confused.

 

Nice Work

But can u make a GUI for this tool.It will help those who can't do it manually.

Maybe :) Could be really great.

 

Btw, a new version is out! Now there is no limitation for "-efix" anymore. I highly optimized the embedding so that one big&fast entry point is being created.

 

To make use of the optimization you have to use the multiple embed feature.

 

pefrmdllembed.exe -efix GTA.EXE asi1.asi asi2.asi (...) asi21.asi GTA_OUTPUT.EXE

Edited by The_GTA
Link to comment
Share on other sites

@The_GTA, it's good that you keep on learning stuff, that you've learnt how the PE files are structured, but this software is totally unnecessary I think.

Consider that we lose the possibility to update the ASI files.

Edited by fastman92
Link to comment
Share on other sites

@The_GTA, it's good that you keep on learning stuff, that you've learnt how the PE files are structured, but this software is totally unnecessary I think.

Consider that we lose the possibility to update the ASI files.

I think you have a point! There has to be an application that detects what ASIs have been embedded and give you a button to update. But this maybe in the future.

 

Would be great to have fastman92 limit adjuster support, too! :)

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
MrGTAmodsgerman

 

What about GTA V support?

Should work. I assume you know about the quirks. GetModuleHandle to get the memory base address of GTA V executable, etc.

 

Important: avoid __declspec( thread ) like a plague, it screws up the embedding (pretty sure also the C++11 thead_local thing?)

 

I am speaking about: 64bit exe GTA V is no problem. No experience in anti-cheat for new R* games.

 

Sorry to say aber ich habe keine Ahnung wo von du da redest! Also ich weiß das man die Memoryadresse kriegen muss, und warum aber der Rest, ka.

Could you please do this? I will provide you a gta5.exe file. I did it, but the launcher says in a about a second that the game was canceled

Edited by MrGTAmodsgerman
Link to comment
Share on other sites

  • 2 weeks later...

Yeah, I can confirm that this works on practically any game you throw at it. As a test I tried it on an old kids' game I have on my archives - normally Dress Designer loads ASIs through a loader that can inject code via ddraw, but with pefrmdllembed I am able to get LINK/2012's example code to work unaided.

  • Like 2
76561198000404928.png

Link to comment
Share on other sites

  • 1 month later...

For some reason I was inspired to work on this again. So here is support for removing DLL dependencies by direct import table injection aswell as Linux support!

 

Download latest version at https://osdn.net/projects/pefrm-units/releases/ .

 

Example: removing vorbis.dll, vorbisFile.dll, eax.dll, ogg.dll dependencies from GTA_SA.EXE

1. place pefrmdllembed.exe into your GTA folder

2. open cmd.exe in your GTA folder

3. execute: pefrmdllembed -impinj GTA_SA.EXE vorbisFile.dll vorbis.dll ogg.dll eax.dll GTA_SA_NODEPEND.EXE

4. (optional): remove vorbisFile.dll vorbis.dll ogg.dll eax.dll from your GTA SA folder

5. run GTA_SA_NODEPEND.EXE; it should work without loading the DLLs from disk

 

The big new feature is the "-impinj" commandline option. If the input executable imports things from vorbisFile.dll and you inject it using -impinj then pefrmdllembed will attempt to resolve all the dependencies using the embedded module. The result is a more compact executable: you do not have to ship the embedded DLL anymore! Also users cannot mistakenly replace the vorbisFile.dll anymore, less attack surface. Consider using this feature for more than just ASI files. :)

Edited by The_GTA
Link to comment
Share on other sites

Cool. But what's the point of it? I mean I don't know the benefits. Less files and more compability with other mods?

Link to comment
Share on other sites

Igor Bogdanoff

total conversions could benefit from it

Link to comment
Share on other sites

Creating specialized executable files could be the future of GTA modding. :) At least such a tool has not existed before, after countless search on the Internet, and that is what my research aims at most of the time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.