-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDK: Bruteforce UProperty/FField Name/Next offsets
- Loading branch information
Showing
6 changed files
with
177 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <spdlog/spdlog.h> | ||
|
||
#include "UObjectArray.hpp" | ||
|
||
#include "UProperty.hpp" | ||
|
||
namespace sdk{ | ||
UClass* UProperty::static_class() { | ||
return (UClass*)sdk::find_uobject(L"Class /Script/CoreUObject.Property"); | ||
} | ||
|
||
void UProperty::update_offsets() { | ||
if (s_attempted_update_offsets) { | ||
return; | ||
} | ||
|
||
s_attempted_update_offsets = true; | ||
|
||
UField::update_offsets(); | ||
|
||
SPDLOG_INFO("[UProperty] Bruteforcing offsets..."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include "UClass.hpp" | ||
|
||
namespace sdk { | ||
class UProperty : public UField { | ||
public: | ||
static UClass* static_class(); | ||
static void update_offsets(); | ||
|
||
FName& get_property_name() const { | ||
return *(FName*)((uintptr_t)this + s_name_offset); | ||
} | ||
|
||
private: | ||
static inline bool s_attempted_update_offsets{false}; | ||
static inline uint32_t s_name_offset{0x0}; // idk what it is usually. | ||
static inline uint32_t s_structure_size{0x0}; // idk what it is usually. | ||
|
||
friend class UStruct; | ||
}; | ||
} |