Questions tagged [struct]
A specific C language data-type construct which allow to declare a list of primitive types variables bound together in a single logical memory unit.
10
questions
12
votes
2
answers
16k
views
How to find arrays of objects (entities, enemies) in a game I'm reversing with Cheat Engine?
I am reversing a game using Cheat Engine and OllyDBG, through this memory addresses within an FPS game are read and monitored, these addresses will contain the coordinates(xyz) of enemies.
My ...
10
votes
3
answers
13k
views
Converting a virtual table from .rdata into an IDA struct
Is there a way to convert a .rdata vtable entry to an IDA struct? An example of the vtable entry:
And what the resulting struct should look like (but with all entries - this vtable specifically, ...
9
votes
1
answer
4k
views
IDA Pro: use structs on parameters
I have a small function that is given a struct as parameters. The struct looks to something like this:
struct my_struct {
short a;
unsigned int b;
unsigned int c;
};
Taking care of the ...
8
votes
2
answers
3k
views
How to deal with Static Memory Allocation while modifying an executable?
I'm not new to StackExchange, but I'm quite new to reverse engineering, so please be patient with me! :P
At present I'm dealing with an executable that I would like to modify a little bit, for ...
7
votes
1
answer
3k
views
Struct with negative offset in IDA possible
I have a structure which looks like this:
RefString struct
RefCount dd ?
StrLen dd ?
CString db...
RefString ends
When the code passes around a pointer, it doesn't point to the ...
6
votes
1
answer
10k
views
How to apply IDA structure to a pointer of a structure
I've encountered this function, which accepts a pointer to what I believe is a custom C struct. I came to this conclusion based on subsequent access to it.
arg_0= dword ptr 4 ;struct passed in
...
5
votes
1
answer
1k
views
IDA: setting a register as a basepointer to struct
I read that question here (How do you set registers as structs within a function in IDA?) but this applies only to individual lines.
Is it possible to set a register as a basepointer for a scope so ...
4
votes
2
answers
847
views
Struct reconstruction in decompilers
I'm testing several decompilers about struct reconstruction, given the following C example:
struct S {
int x;
int y;
long z;
long t;
};
int foo(struct S s) {
return s.x + s.y + s....
2
votes
2
answers
3k
views
Initializing a struct in win32 assembly programming using MASM
I'm trying to create a demo program demonstrating struct(s) in MASM ,
I've written a code like this :
struct1 struct
first db ?
second dw ?
struct1 EndS
.386
.model flat,stdcall
option casemap:none
...
1
vote
1
answer
60
views
How are members of a Structure Type positioned on the stack?
Some of the structure types have members that are not stacked next to each other. Check out the structure type at 0x33E6 in bzip2_base (x86-64) here. There's an int at location offset 0, a char at 4 ...