This is the AMP version of this page.
If you want to load the real page instead, click this text.

Solved Int array

Status
Not open for further replies.

Denka

Platinian
Original poster
Sep 1, 2019
15
0
1
24
Ukr
How to get int array field?
C++:
int[] stats = *(int[] *) ((uint64_t) instance + 0x30);
Here is error
 

Smiley3rd

Platinian
Oct 4, 2020
29
434
48
24
Indonesia
You could use this, just import it to your project
UnityStuff-1/Unity.h at master · Karveit/UnityStuff-1 · GitHub

example hooking using monoArray

let's take yours as example

in dump
int[] stats; //0x30


hooking would be like this

void (*old_update)(void *instance);
void update(void *instance) {
if (instance!= NULL) {

monoArray<int> *stats = *(monoArray<int> **) ((uint64_t) instance + 0x30);

if (stats != NULL) {

for (int i = 0; i < stats->getLength(); i++) {

auto stat = stats->getPointer(); //THIS IS THE STATS

}

}

}
old_update(instance);
}
 

Smiley3rd

Platinian
Oct 4, 2020
29
434
48
24
Indonesia
 

Denka

Platinian
Original poster
Sep 1, 2019
15
0
1
24
Ukr
i have problem while compilling Unity.h TT
 

Smiley3rd

Platinian
Oct 4, 2020
29
434
48
24
Indonesia
i have problem while compilling Unity.h View attachment 479327View attachment 479327TT
it's literally saying what the error is...
because im in the mood ill help you,
go to the unity file and change the following

#include <mach-o/dyld.h>
#define ASLR_BIAS _dyld_get_image_vmaddr_slide
uint64_t getRealOffset(uint64_t offset){
return ASLR_BIAS + offset;
}

to

#include "Includes/Utils.h"
uint64_t getRealOffset(uint64_t offset){
return getAbsoluteAddress("libil2cpp.so", offset);
}
 
Reactions: Denka

G-Bo ッ

Administrator
Staff member
Administrator
Mar 22, 2017
8,857
350,033
2,350
Behind you.
platinmods.com
It seems this question is solved, so i will lock the thread.
If you're unhappy with that, just send me a message and i will reopen the thread.
 
Status
Not open for further replies.