Skip to content

Commit 56649df

Browse files
authored
Update functions.hpp
+ updated niggas
1 parent 9535fd6 commit 56649df

File tree

1 file changed

+10
-35
lines changed

1 file changed

+10
-35
lines changed

functions.hpp

+10-35
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <dependencies/roblox/offsets.hpp>
55

66
/* struct */
7-
struct r_TValue // since iivillian told me using structs is normal, i will use it for *few funcs only*
7+
struct r_TValue
88
{
99
union
1010
{
@@ -19,43 +19,15 @@ struct r_TValue // since iivillian told me using structs is normal, i will use i
1919
int tt;
2020
};
2121

22-
struct r_CallS // for protected call obv
22+
struct r_CallS
2323
{
2424
r_TValue* func;
2525
int nresults;
2626
};
2727

2828
// offsets
29-
const auto luastate_top = 24;
30-
const auto luastate_base = 12;
31-
const auto luastate_lg = 8;
32-
const auto luastate_activememcat = 4;
33-
34-
const auto globalstate_currentwhite = 20;
35-
const auto globalstate_frealloc = 12;
36-
const auto globalstate_totalbytes = 56;
37-
38-
const auto closure_isc = 3;
39-
const auto closure_env = 12;
40-
const auto closure_preload = 6;
41-
const auto closure_stacksize = 5;
42-
const auto closure_upvals = 32;
43-
const auto closure_nupvals = 4;
44-
45-
const auto closure_debugname = 24;
46-
const auto closure_f = 16;
47-
const auto closure_cont = 20;
48-
49-
const auto tvalue_tt = 12;
50-
51-
const auto gch_marked = 2;
52-
const auto gch_tt = 0;
53-
const auto gch_memcat = 1;
54-
55-
__inline std::uintptr_t r_G(const std::uintptr_t a1)
56-
{
57-
return *reinterpret_cast<const std::uintptr_t*>(a1 + luastate_lg) - (a1 + luastate_lg);
58-
}
29+
const auto luastate_top = 8;
30+
const auto luastate_base = 16;
5931

6032
__inline std::uintptr_t r_incr_top(const std::uintptr_t a1)
6133
{
@@ -75,12 +47,15 @@ __inline void r_setobj2s(r_TValue* obj1, r_TValue* obj2)
7547
}
7648

7749
// addresses
78-
const auto r_luaO_nilobject = aslr(0x3087C80);
50+
const auto r_luaO_nilobject = aslr(0x222D240);
51+
const auto xorconst_address = aslr(0x2E01520);
52+
const auto pseudo2_address = aslr(0x171E540);
53+
54+
const auto luad_precall_address = aslr(0x171FD60);
55+
const auto luad_rawrunprotected_address = aslr(0x1725E00);
7956

80-
const auto pseudo2_address = aslr(0x16D4800);
8157
const auto r_pseudo2addr = reinterpret_cast<r_TValue*(__fastcall*)(std::uintptr_t, std::int32_t)>(pseudo2_address);
8258

83-
const auto xorconst_address = aslr(0x3014E90);
8459
__inline std::double_t r_xor_double(const std::double_t* from)
8560
{
8661
__m128d xmm_key = _mm_load_pd(reinterpret_cast<const std::double_t*>(xorconst_address));

0 commit comments

Comments
 (0)