Questions tagged [array]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
59 views

Hexrays - Enhance decompilation of "pre-multiplied" array indices?

For this x86 (Watcom 1997) assembly that loops over an array, Hexrays yields the following pseudo code: lea eax, ds:0[ecx*4] add eax, ecx shl eax, 3 mov [esp+310h+iMulSize], eax mov ...
Ray's user avatar
  • 1,083
3 votes
1 answer
195 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 ...
E.A's user avatar
  • 171
2 votes
0 answers
80 views

Decoding set of byte arrays representing light spectrum

I have a small spectrometer that measures in the spectral range of 740-1070nm. The device is commercial, and used to send the raw data to the manufacturer's server for decoding, but that does not seem ...
J-M's user avatar
  • 21
2 votes
1 answer
378 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 ...
Oliver Vedel Rasmussen's user avatar
2 votes
1 answer
1k views

How to get array size of a global variable using IDApython?

I can make an array using MakeArray. Is there a function to get the size of the array I've created? I've tried GetArrayId + GetLastIndex but it doesn't seem to work.
sololevelingreverser's user avatar
0 votes
1 answer
178 views

RE4B challenge 65: how to determine the first dimension of the array?

Challenge 65: Try to determine the dimensions of the array, at least partially. _array$ = 8 _x$ = 12 _y$ = 16 _z$ = 20 _f PROC mov eax, DWORD PTR _x$[esp-4] mov edx, DWORD PTR ...
A.J's user avatar
  • 135
0 votes
1 answer
1k views

How to convert IDA Pseudo code casts to Array

I have a pseudo code in IDA which is as such consdering v5= 3838385024767399985LL v1 += 53 * *((char *)&v5 + i); In C-Friendly format this should be v1 += 53 * v5[i] Is there any way in IDA ...
Adshead's user avatar
1 vote
1 answer
391 views

Odd convention for accessing elements of an array?

While reverse engineering a game using the Hex Rays decompiler I was looking for how an array of NPC's was accessed. I found the array but I don't quite understand the unusual formula for getting the ...
Edward Severinsen's user avatar
1 vote
1 answer
2k views

IDA Pro Export C style array using Python instead of GUI menu

IDA Pro 6.95. From the menu I can use Edit... Export data... C unsigned char array (hex). I want to do this in a Python script without rewriting what already works. I have looked for a way to find a ...
John Banks's user avatar
0 votes
3 answers
449 views

Hex-Rays decompiles array to int

I decompiled one dll using Hex-Ray but it decompiled array type input argument of dll to int. Any idea how to handle this ?? double dzSell(int a1, double a2, int a3, int a4, int a5) int a1 is array ...
Krzysztof's user avatar
3 votes
1 answer
528 views

Does hex-rays support VLA in any way?

I was testing some 'C' code with VLAs. It wasn't that surprising that Hex-Rays was not able to recognize VLA. As with structures there is some way to make it understand (simply making the variable ...
rec's user avatar
  • 475
1 vote
1 answer
4k views

IDA Array of structs hiding strings

I have just started teaching myself IDA and I have had some trouble with an array of structs. I have found and defined a struct similar to this: (simplified) struct { char filename[50]; int field2; ...
Nathan Williams's user avatar
5 votes
1 answer
6k views

How to make stack variables into an array in IDA Pro

I've got a procedure in IDA Pro with a few local stack variables, but part of them belong to an array. I would like to define the array, but pressing * (Create Array) fails, and pressing Y (Set Type) ...
darkf's user avatar
  • 53
2 votes
1 answer
779 views

Using GetProcAddress with offset syntax

I have the following line (I use IDA PRO) : ... push (offset aPstorec_dllwne+0Ch) ; lpProcName push esi ; hModule call GetProcAddress_0 ... When I ...
user3097712's user avatar
  • 1,531