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.
68 questions
0 votes
1 answer
27 views
Analyze task_struct in linux kernel
I have a Linux kernel that I open with Ghidra. There is a task_struct that I want to map all the fields. The problem is that os big struct (around 3000 bytes) and have lot of ifdef in the source code. ...
0 votes
0 answers
84 views
Why does a function with 3 parameters is decompiled as 9 parameters?
For a PowerPC binary with debugging symbols, the function signature is: CrossProduct(VECTOR *,VECTOR,VECTOR) It's correct as it matches the source code for an older version of the application: void ...
1 vote
0 answers
85 views
How can I create a radare2 type for a variable-length struct?
I'm trying to parse a binary file and it has a structure similar to this, struct foo { int64_t count_things; int64_t offset_to_thing[count]; int8_t bytes[]; int64_t other fields; } ...
1 vote
0 answers
338 views
Ghidra: undefined4 to bytearray
I am trying to reverse a c++ program and make the decompiler represent a byte-array in a single line. The c++ code contains the following line: BYTE fileArray[139] = {0x50, 0x51....} Ghidra ...
3 votes
1 answer
267 views
IDA Decompiler generates wrong output on array of structures!
There is a structure with size of 16-Bytes, and an array of it is defined. The disassembly code for navigation through the array is: MOV i, i,LSL#4 LDR R4, =arr_of_struct ADD i, i, R4 LDR ...
2 votes
0 answers
120 views
Is it no longer possible to re-order structures in IDA?
In older versions of IDA, you could right-click a struct in the structure view and change its position in the list, making it easier to separate "internal" vs "external" structs. ...
2 votes
0 answers
83 views
PDF file have two trailers?
If I analyse multiple PDF files with a hex editor, I see that all of them have two trailers. That's possible if an object has changed or renewed (https://blog.idrsolutions.com/multiple-trailers-in-a-...
2 votes
1 answer
407 views
Identify two structs in IDA
When decompiling an exe file, I have defined two structs struct A and struct B that are of the same structure. They appeared under different contexts, thus I assumed that they were different structs. ...
1 vote
0 answers
73 views
Need help finding a windows struct
What I know about it: struct unknown_struct { struct _KAPC apc; struct _KEVENT event; char unknown[2056]; }; So first a kernel apc struct then a kernel event struct and the total size is ...
0 votes
2 answers
1k views
How to set a variable as "pointer to struct" in IDA in order to automatically replace offsets by field names?
In IDA, I have the following disassembly code (from an old 16-bit DOS application) : les bx, _Foo mov word ptr es:[bx+84h], 0FFFFh mov word ptr es:[bx+8Ch], 0FFFFh mov word ptr es:[bx+...
2 votes
1 answer
476 views
How do I reverse engineer structs that are put as parameters in a function
how do I go around figuring out where to reverse engineer a struct? As shown in the picture below, I have this function called "struct dynamic_array" which I want to reverse engineer and ...
2 votes
2 answers
641 views
How to restore struct fields
I have an object named ComputeService::RPC that is being used as input in a function inside a binary file: __int64 __fastcall ComputeService::Rpc::GetClientProcessId(ComputeService::Rpc *this) pc *...
-1 votes
2 answers
1k views
Parse offset to PE struct
Im trying make my idb beautier. I want to parse the offset to PE structure. Here is some example: I want to parse (module + 60) to (module_base->e_lfanew) but when i change the type of module_base ...
1 vote
1 answer
188 views
Define partial struct with IDA
I want to define struct in Ida , but I know only partial of this struct I only know that in arr[12] that int student_id , and I don't know the rest of struct. Ida recognize that struct as char * . How ...
0 votes
1 answer
208 views
troublesome stack frame setup
I have a function with the first few instructions defined as follows: sub rsp, 0x80 lea rbp, [rsp + 0x20] mov qword [rbp + 0x58], rsi mov qword [rbp + 0x50], rbx mov qword [rbp + 0x70], rcx mov ...