Jump to content

[V] Script/Native Documentation and Research


Recommended Posts

 

 

Native hash translation table for 1.34?

Yeah i second that.

It would really be appreciated.

 

Thanks.

 

What use do you have for the tables?

 

 

There are still multiple ways to use menu's that are not based on scripthook but still use natives.

Not everyone is gonna release or sell when they can make something theirself.

Alexander Blade

Native hash translation table from b678 to b757

http://pastebin.com/BhTbmXJe

  • Like 3

dinput8.dll wont let me start my gta v i have all the installed updates for script hook! but whenever i delete the dinput8 file from the directory it lets me start the game but no mods because its required can anybody help me fix? windows 10

unknown modder

dinput8.dll wont let me start my gta v i have all the installed updates for script hook! but whenever i delete the dinput8 file from the directory it lets me start the game but no mods because its required can anybody help me fix? windows 10

Im going to hazard a guess that its on of your mods thats the issue, not the asi loader, what do the asi loader log and scripthookv log say

 

dinput8.dll wont let me start my gta v i have all the installed updates for script hook! but whenever i delete the dinput8 file from the directory it lets me start the game but no mods because its required can anybody help me fix? windows 10

Im going to hazard a guess that its on of your mods thats the issue, not the asi loader, what do the asi loader log and scripthookv log say

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

InfamousSabre

 

 

dinput8.dll wont let me start my gta v i have all the installed updates for script hook! but whenever i delete the dinput8 file from the directory it lets me start the game but no mods because its required can anybody help me fix? windows 10

Im going to hazard a guess that its on of your mods thats the issue, not the asi loader, what do the asi loader log and scripthookv log say

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

 

Update your scripthook

 

 

 

dinput8.dll wont let me start my gta v i have all the installed updates for script hook! but whenever i delete the dinput8 file from the directory it lets me start the game but no mods because its required can anybody help me fix? windows 10

Im going to hazard a guess that its on of your mods thats the issue, not the asi loader, what do the asi loader log and scripthookv log say

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

 

Update your scripthook

 

ive already updated the scripthook lol

 

 

 

 

dinput8.dll wont let me start my gta v i have all the installed updates for script hook! but whenever i delete the dinput8 file from the directory it lets me start the game but no mods because its required can anybody help me fix? windows 10

Im going to hazard a guess that its on of your mods thats the issue, not the asi loader, what do the asi loader log and scripthookv log say

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

 

Update your scripthook

 

ive already updated the scripthook lol

 

 

 

:facedesk::facedesk:

 

ok guys i just deleted gtav and all of my mods and did a fresh start then i downloaded the updated version of scripthook put it in my directory and it still pops up FATAL: unknown game version, check http://dev-c.comfor updates! supported versions are 1.0.335.2, 1.0350.1/2 1.0.372.2, 1.0.393.2/4 1.0.463.1 1.0.505.2 1.0.573.1 1.0.617.1 1.0.678.1

seriously guys i need help!

unknown modder

:facedesk::facedesk:

 

ok guys i just deleted gtav and all of my mods and did a fresh start then i downloaded the updated version of scripthook put it in my directory and it still pops up FATAL: unknown game version, check http://dev-c.comfor updates! supported versions are 1.0.335.2, 1.0350.1/2 1.0.372.2, 1.0.393.2/4 1.0.463.1 1.0.505.2 1.0.573.1 1.0.617.1 1.0.678.1

seriously guys i need help!

 

99% of people(myself included) are having no issue whatsoever with the latest version of ScriptHookV, Delete ScriptHookV.dll from GTAV directory, go to http://dev-c.com/gtav/scripthookv/, click the download button, make sure when you go to extract it, you arent extracting an old version still in your download folder. then copy the ScriptHookV.dll into you GTAV directory. then it should work.

If it still doesnt work, do you have 2 different game installations on your pc? are you using a legit copy of GTA V(pirated copies will cause issue)?

InfamousSabre

 

 

 

 

dinput8.dll wont let me start my gta v i have all the installed updates for script hook! but whenever i delete the dinput8 file from the directory it lets me start the game but no mods because its required can anybody help me fix? windows 10

Im going to hazard a guess that its on of your mods thats the issue, not the asi loader, what do the asi loader log and scripthookv log say

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

The ask loader don't say anything I don't guess but when I install the new script hook and put the 3 files in my directory is says I don't have the latest version and it tells me the supported ones but I have them idk what's going on I can't even play anymore should I delete the game and the mods and fresh start?

 

Update your scripthook

 

ive already updated the scripthook lol

 

Then do it again.

Reverse engineering GTA 5 has never been easier:

YtwPx9q.png

 

I wrote an IDA script to find every call to RegisterNative, get the hash in RCX, the function it registers in RDX, and dumped it to a separate file. Then, I made a separate program that downloads all the natives from NativeDB, looks for known natives in the dump file, and builds a script that produces the results you see above.

 

I'm not entirely sure if this would be useful for newer versions of GTA 5, since Rockstar is constantly figuring out new ways to mess with us, lol.

 

EDIT: Oops, some $UNK's actually belong in a namespace. I'll fix that :p

Edited by Fireboyd78
mockba.the.borg

Which version of GTA5.exe is this? I only have 678.1, 757.2 and 757.4.

 

I did some research the other day and found out that on 757.4 (and the others I have), the natives will not be on the GTA5.exe executable, but on a BTree that is built in memory.

I wrote a small app to traverse the tree in memory, finding all the hashes and executable entry points for the natives, my next step now would be to identify "who" these natives are, and maybe see if I can automate the process of renaming them.

 

Good job by the way. Is the IDA script Python?

 

Thanks,

Mockba.

Which version of GTA5.exe is this? I only have 678.1, 757.2 and 757.4.

 

I did some research the other day and found out that on 757.4 (and the others I have), the natives will not be on the GTA5.exe executable, but on a BTree that is built in memory.

I wrote a small app to traverse the tree in memory, finding all the hashes and executable entry points for the natives, my next step now would be to identify "who" these natives are, and maybe see if I can automate the process of renaming them.

 

Good job by the way. Is the IDA script Python?

 

Thanks,

Mockba.

The version I have is 323.

 

I used IDC but it could possibly be rewritten in Python. Could you PM me more information about this "BTree" (Binary Tree, yes?) research? You've got me curious about it now, haha.

 

Oh and actually, if you can export the data to a file format I created for my NativeGenerator, I could provide you with an auto generated script that will rename them for you. Do you know the original hashses for them? If so, I can pull the data off NativeDB and provide the script like I said.

Edited by Fireboyd78
  • 2 weeks later...

Good work @Fireboyd78, here's a couple of things that may help you and @mockba.the.borg or be useful to someone anyway.

 

NativeHashFunctionFinder is a proof of concept based on an idea by Bucho back around page 6. Given a HASH for a Native Function, and a running copy of GTA5.exe, it will produce the address of the native function. This address matches what you would get from CE if you followed the same process. It was written and tested with the latest build (at this time, b757). n.b. it has only been tested with GET_PLAYER_PED. The assumption is that Bucho was correct when he wrote that the function address was 0x40 bytes before the HASH, which has proved to be the case with GET_PLAYER_PED.

 

Btree what now? :p

 

Also, there are copies of AB's natives.h, with the hashes updated to match any build of GTA5. So, if you want to look up a native hash in b757, you'll need to get the correct hash from natives-b757.txt.h (a sample hash is provided in the code for b757).

 

Obviously you'll need to run the app (which is a console app, BTW) as Adminstrator. Incorporate into your own code as you wish.

 

Sample output:

C:\...\Debug>ConsoleApplication1.exeenter Native Hash (or 0 for GET_PLAYER_PED)0Found GTA5.exe, PID: 17124Scanning process for hash 0xc834a7c58deb59b40x1d81d610000: 0004Found hash at address: 0x 1d82b8e0428Pointer to Native Function is at: 0x 1d82b8e03e8Native Function Address: 7ff6cc2a39f4Found 1 results!

icon.tmp.pngNativeHashFunctionFinder.exe16K

icon.cpp.pngNativeHashFunctionFinder.cpp6.3K

icon.h.pngnatives-b757.txt.h733K

icon.h.pngnatives-b678.txt.h733K

icon.h.pngnatives-b617.txt.h733K

icon.h.pngnatives-b573.txt.h733K

icon.h.pngnatives-b505.txt.h733K

icon.h.pngnatives-b463.txt.h733K

icon.h.pngnatives-b393.txt.h733K

icon.h.pngnatives-b372.txt.h733K

icon.h.pngnatives-b350.txt.h733K

 

 

And if those links didn't work, just go to https://nt4.com/gta5/


  • Like 1
  • 2 weeks later...

Not sure if this will be any help in updating ScriptHookV to the next version, but I wrote some code that iterated all the hashes in b757 and produced memory locations and partial disassembly.

 

https://github.com/sfinktah/NativeHashFunctionFinder/

 

It won't run against the new build, but I saved a copy of the output from b757:

 

https://nt4.com/gta5/signatures.decompile.brief.b757.txt

Disassembled with diStorm version: 3.3.4Scanning process for PLAYER::GET_PLAYER_PED hash 0xc834a7c58deb59b4Found hash at address: 0x 1f49ab20428Pointer to Native Function is at: 0x 1f49ab203e8Native Function Address: 0x 7ff7464a39f400007ff7464a39f4 (05) e9e82e9a02 JMP 0x7ff748e468e100007ff748e468e1 (05) 48895c24f8 MOV [RSP-0x8], RBX00007ff748e468e6 (05) 488d6424f8 LEA RSP, [RSP-0x8]00007ff748e468eb (04) 4883ec20 SUB RSP, 0x2000007ff748e468ef (04) 488b4110 MOV RAX, [RCX+0x10]00007ff748e468f3 (05) e9494b7f00 JMP 0x7ff74963b441Scanning process for PLAYER::GET_PLAYER_PED_SCRIPT_INDEX hash 0xf55c9372b9e63070Found hash at address: 0x 1f49ab21338Pointer to Native Function is at: 0x 1f49ab212f8Native Function Address: 0x 7ff7464a3a3400007ff7464a3a34 (05) e90f4bad00 JMP 0x7ff746f7854800007ff746f78548 (05) 488d6424f8 LEA RSP, [RSP-0x8]00007ff746f7854d (04) 48891c24 MOV [RSP], RBX00007ff746f78551 (05) e9adb9a901 JMP 0x7ff748a13f03Scanning process for PLAYER::SET_PLAYER_MODEL hash 0x3590a8146209253cFound hash at address: 0x 1f49ae170a0Pointer to Native Function is at: 0x 1f49ae17060Native Function Address: 0x 7ff7464acf9800007ff7464acf98 (05) e987382e03 JMP 0x7ff74979082400007ff749790824 (04) 488b4110 MOV RAX, [RCX+0x10]00007ff749790828 (03) 8b5008 MOV EDX, [RAX+0x8]00007ff74979082b (05) e94cd82bff JMP 0x7ff748a4e07c
and so forth, and so on.

 

 

  • Like 2

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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