Skip to content

Commit

Permalink
Update v0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
kp7742 committed Oct 19, 2020
1 parent 97ec3a6 commit 6f5e222
Show file tree
Hide file tree
Showing 13 changed files with 346 additions and 176 deletions.
Binary file modified .DS_Store
Binary file not shown.
47 changes: 30 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
## UE4Dumper(Unreal Engine 4 Dumper)
Dump Lib libUE4.so from Memory of Game Process and Generate Structure SDK of Supported Game in Android. You can Find Latest Dumped SDK from [HERE](https://github.com/kp7742/UE4Dumper/tree/master/SDKs/)
Unreal Engine 4 Dumper for Android Devices, Dump Lib libUE4.so from Memory of Game Process and Generate Structure SDK of Supported Game in Android. You can Find Latest Dumped SDK from [HERE](https://github.com/kp7742/UE4Dumper/tree/master/SDKs/)

## Changelog
- v0.1: First Release
- v0.2: Experimental 64bit Support Added
- v0.3: Fix Object Iteration Issue during Dumping SDK, Added Support to Resolve Arrays, Sets and Maps Structure
- v0.4: 1) Expanded 64bit Support,
2) Fixed 64bit Library Rebuilding Not Working
3) Added New Elf Dump Fix for 64bit Library
4) Added Option to Dump SDK with GWorld
5) Updated Usage Text.
- v0.3:
- 1) Fix Object Iteration Issue during Dumping SDK
- 2) Added Support to Resolve Arrays, Sets and Maps Structure
- v0.4:
- 1) Expanded 64bit Support,
- 2) Fixed 64bit Library Rebuilding Not Working
- 3) Added New Elf Dump Fix for 64bit Library
- 4) Added Option to Dump SDK with GWorld
- 5) Updated Usage Text
- v0.5: Added Support to Resolve Functions
- v0.6: 1) Added Support for UE 4.23+ Games for Strings and Objects(Use new Option: --newue)
2) Added 64bit Offsets to Fix 64bit Support
3) Updated SDK Generation Method for Faster Dumping
4) Short Options has been remove due to conflict with new options
- v0.7: Fixed Object Dumping issue for PUBG CN(As of Now Tested on GP v1.8.10.8640).
- v0.6:
- 1) Added Support for UE 4.23+ Games for Strings and Objects(Use new Option: --newue)
- 2) Added 64bit Offsets to Fix 64bit Support
- 3) Updated SDK Generation Method for Faster Dumping
- 4) Short Options has been remove due to conflict with new options
- v0.7: Fixed Object Dumping issue for PUBG CN(Tested on GP v1.8.10)
- v0.8: Fixed 64bit Support for Latest PUBG Version
- v0.9: Fixed Dumping issue with 64bit PUBG
- v0.10:
- 1) Added Option to View Actors of Main Level(Use new Option: --actors)
- 2) Support for PUBG CN(GP) Fixed(Tested on GP v1.9.10)
- 3) Fixed Some Offsets Issues due to Modified UE4 Versions
- 4) Offsets System Updated to Work with Other games, other then PUBG

## Features
- No need of Ptrace
- Bypass Anti Debugging
- Dumping of Lib from Memory of Game
- Fix and Regenerate So(Elf) File from Dump
- Dumping of Game Structure SDK file(Need to Find Pointers Manually)
- Support Fast Dumping(May Miss some data)
- Support SDK Dumping for UE4 Based Games
- Support Fast Dumping(Might Miss some data)
- Support SDK Dumping for UE4 Based Android Games
- Tested on 32bit and 64bit PUBG Mobile Series

## Note
- Use 32bit and 64bit Version on Respected Arch of Game.
- Some Games with Modified UE4 Might not Dump Correctly.
- Recommend to use in Training Mode for PUBG Mobile.
- Fortnite using modified engine so SDK Dumping is Not Possible right now.
- If it stuck during Generating SDK, Then Simple Stop it, Check Dump file and If needed then Try again.

## How to use
Expand All @@ -45,7 +54,7 @@ Dump Lib libUE4.so from Memory of Game Process and Generate Structure SDK of Sup
```
./ue4dumper -h
UE4Dumper v0.8 <==> Made By KMODs(kp7742)
UE4Dumper v0.10 <==> Made By KMODs(kp7742)
Usage: ue4dumper <option(s)>
Dump Lib libUE4.so from Memory of Game Process and Generate structure SDK for UE4 Engine
Tested on PUBG Mobile Series
Expand All @@ -69,8 +78,12 @@ Dump Lib libUE4.so from Memory of Game Process and Generate Structure SDK of Sup
--lib Dump libUE4.so from Memory
--raw(Optional) Output Raw Lib and Not Rebuild It
--fast(Optional) Enable Fast Dumping(May Miss Some Bytes in Dump)
--Show ActorList With GWorld Args--------------------------------------------------------
--actors Show Actors with GWorld
--gname <address> GNames Pointer Address
--gworld <address> GWorld Pointer Address
--Other Args-----------------------------------------------------------------------------
--newue(Optional) Run in UE 4.23+ Mode
--newue(Optional) Run in UE 4.23+ Mode
--package <packageName> Package Name of App(Default: com.tencent.ig)
--output <outputPath> File Output path(Default: /sdcard)
--help Display this information
Expand Down
Binary file added jni/.DS_Store
Binary file not shown.
20 changes: 14 additions & 6 deletions jni/FNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using namespace std;

bool isUE423 = false;
uint32 GNameCount = 170000;

string getUEString(kaddr address) {
Expand All @@ -20,7 +19,7 @@ string GetFNameFromID(uint32 index) {
uint32 chunkOffset = index >> 16;
uint16 nameOffset = index;

kaddr fNamePool = getRealOffset(Offsets::GNames) + 0x30;
kaddr fNamePool = getRealOffset(Offsets::GNames) + Offsets::FNameToFNamePool;

kaddr namePoolChunk = getPtr(fNamePool + ((chunkOffset + 2) * 8));
kaddr entryOffset = namePoolChunk + (2 * nameOffset);
Expand All @@ -33,12 +32,21 @@ string GetFNameFromID(uint32 index) {

return uestring;
} else {
kaddr TNameEntryArray = getPtr(getRealOffset(Offsets::GNames));
if (deRefGNames) {
kaddr TNameEntryArray = getPtr(getRealOffset(Offsets::GNames));

kaddr FNameEntryArr = getPtr(TNameEntryArray + ((index / 0x4000) * Offsets::PointerSize));
kaddr FNameEntry = getPtr(FNameEntryArr + ((index % 0x4000) * Offsets::PointerSize));
kaddr FNameEntryArr = getPtr(TNameEntryArray + ((index / 0x4000) * Offsets::PointerSize));
kaddr FNameEntry = getPtr(FNameEntryArr + ((index % 0x4000) * Offsets::PointerSize));

return getUEString(FNameEntry + Offsets::FNameEntryToNameString);
return getUEString(FNameEntry + Offsets::FNameEntryToNameString);
} else {
kaddr TNameEntryArray = getRealOffset(Offsets::GNames);

kaddr FNameEntryArr = getPtr(TNameEntryArray + ((index / 0x4000) * Offsets::PointerSize));
kaddr FNameEntry = getPtr(FNameEntryArr + ((index % 0x4000) * Offsets::PointerSize));

return getUEString(FNameEntry + Offsets::FNameEntryToNameString);
}
}
}

Expand Down
40 changes: 20 additions & 20 deletions jni/GUObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ using namespace std;
int32 GetObjectCount(){
if(isUE423) {
return Read<int32>(getRealOffset(Offsets::GUObjectArray) +
Offsets::FUObjectArrayToTUObjectArray + Offsets::TUObjectArrayToNumElementsNew);
Offsets::FUObjectArrayToTUObjectArray + Offsets::TUObjectArrayToNumElements);
} else {
if(isEqual(pkg, "com.tencent.tmgp.pubgmhd")){
return Read<int32>(getRealOffset(Offsets::GUObjectArray) + 0x58 + Offsets::TUObjectArrayToNumElements);
if(deRefGUObjectArray){
return Read<int32>(getPtr(getRealOffset(Offsets::GUObjectArray)) +
Offsets::FUObjectArrayToTUObjectArray + Offsets::TUObjectArrayToNumElements);
} else {
return Read<int32>(getPtr(getRealOffset(Offsets::GUObjectArray)) +
Offsets::FUObjectArrayToTUObjectArray + Offsets::TUObjectArrayToNumElements);
return Read<int32>(getRealOffset(Offsets::GUObjectArray) +
Offsets::FUObjectArrayToTUObjectArray + Offsets::TUObjectArrayToNumElements);
}
}
//return 300000;
}

kaddr GetUObjectFromID(uint32 index) {
Expand All @@ -28,13 +28,13 @@ kaddr GetUObjectFromID(uint32 index) {

return getPtr(Chunk + ((index % 0x10000) * Offsets::FUObjectItemSize));
} else {
if(isEqual(pkg, "com.tencent.tmgp.pubgmhd")){
kaddr FUObjectArray = getRealOffset(Offsets::GUObjectArray);
kaddr TUObjectArray = getPtr(FUObjectArray + 0x58);
if(deRefGUObjectArray){
kaddr FUObjectArray = getPtr(getRealOffset(Offsets::GUObjectArray));
kaddr TUObjectArray = getPtr(FUObjectArray + Offsets::FUObjectArrayToTUObjectArray);

return getPtr(TUObjectArray + (index * Offsets::FUObjectItemSize));
return getPtr(TUObjectArray + (index * Offsets::FUObjectItemSize));
} else {
kaddr FUObjectArray = getPtr(getRealOffset(Offsets::GUObjectArray));
kaddr FUObjectArray = getRealOffset(Offsets::GUObjectArray);
kaddr TUObjectArray = getPtr(FUObjectArray + Offsets::FUObjectArrayToTUObjectArray);

return getPtr(TUObjectArray + (index * Offsets::FUObjectItemSize));
Expand All @@ -44,22 +44,22 @@ kaddr GetUObjectFromID(uint32 index) {

void DumpObjects(string out) {
uint32 count = 0;
ofstream gobj(out + "/UObjects.txt", ofstream::out);
if (gobj.is_open()) {
ofstream obj(out + "/UObjects.txt", ofstream::out);
if (obj.is_open()) {
cout << "Dumping UObjects List" << endl;
for (int32 i = 0; i < GetObjectCount(); i++) {
kaddr uobj = GetUObjectFromID(i);
if (UObject::isValid(uobj)) {
gobj << setbase(10) << "[" << i << "]:" << endl;
gobj << "Name: " << UObject::getName(uobj) << endl;
gobj << "Class: " << UStruct::getClassName(uobj) << endl;
gobj << "ObjectPtr: " << setbase(16) << uobj << endl;
gobj << "ClassPtr: " << setbase(16) << UObject::getClass(uobj) << endl;
gobj << endl;
obj << setbase(10) << "[" << i << "]:" << endl;
obj << "Name: " << UObject::getName(uobj) << endl;
obj << "Class: " << UStruct::getClassName(uobj) << endl;
obj << "ObjectPtr: " << setbase(16) << uobj << endl;
obj << "ClassPtr: " << setbase(16) << UObject::getClass(uobj) << endl;
obj << endl;
count++;
}
}
gobj.close();
obj.close();
cout << count << " UObjects Dumped" << endl;
}
}
Expand Down
Loading

0 comments on commit 6f5e222

Please sign in to comment.