Open axel7083 opened 1 year ago
The function responsible of converting ObjectID
to MessageID
will be called ObjectMessageIDToActualMessageID
and is located at 0x0201fc10
.
An implementation of the function would like this:
int ObjectMessageIDToActualMessageID(unsigned short param_1)
{
int iVar1 = 97;
do {
unsigned short indexValue = (MSG_ID_CHAR_MAP)[iVar1 * 2];
if (param_1 < indexValue) {
unsigned short nextIndexValue = MSG_ID_CHAR_MAP[(iVar1 - 1) * 2];
if (nextIndexValue <= param_1) {
unsigned short difference = param_1 - nextIndexValue;
unsigned short correspondingValue = MSG_ID_CHAR_MAP[(iVar1 + -1) * 2 + 1] & 0xffff;
return difference + correspondingValue;
}
}
iVar1 = iVar1 + -1;
} while (0 < iVar1);
return param_1;
}
The function is not looking for a match, but will rather compute it.
In our example we will take 0x73E
== 1854
.
The ObjectID column is sorted, you need to found the range where MSG_ID_CHAR_MAP[i] < ObjectID <MSG_ID_CHAR_MAP[i +2]
We found the lower bound to be 1850
.
Between the lower bound 1850
and your 1854
, the difference is 4.
The corresponding MessageID of 1850
is 102
, so we got 102+4=106
our messageID is 106
ObjectID | MessageID |
---|---|
0 | 0 |
100 | 4 |
120 | 13 |
130 | 22 |
200 | 23 |
1000 | 42 |
1050 | 51 |
1100 | 56 |
1150 | 59 |
1200 | 62 |
1250 | 64 |
1300 | 76 |
1350 | 77 |
1400 | 79 |
1450 | 80 |
1500 | 82 |
1550 | 83 |
1600 | 84 |
1650 | 86 |
1700 | 87 |
1750 | 88 |
1800 | 92 |
1850 | 102 |
2000 | 131 |
2001 | 135 |
2002 | 139 |
2003 | 143 |
2011 | 154 |
2012 | 158 |
2050 | 162 |
2100 | 166 |
2150 | 167 |
2163 | 179 |
2200 | 180 |
2250 | 182 |
2300 | 183 |
2350 | 184 |
2400 | 186 |
2450 | 187 |
2500 | 188 |
2550 | 189 |
2600 | 196 |
2650 | 202 |
2700 | 203 |
2750 | 204 |
2758 | 215 |
2759 | 219 |
2760 | 223 |
2761 | 227 |
2762 | 231 |
2763 | 235 |
2800 | 236 |
2801 | 240 |
2802 | 244 |
2803 | 248 |
2804 | 252 |
2805 | 256 |
2806 | 260 |
2807 | 264 |
2808 | 268 |
2809 | 272 |
2810 | 276 |
2811 | 280 |
2815 | 287 |
2816 | 291 |
2817 | 295 |
2818 | 299 |
2823 | 307 |
2835 | 322 |
2850 | 330 |
2855 | 338 |
2856 | 342 |
2857 | 346 |
3000 | 352 |
3050 | 353 |
3100 | 354 |
3150 | 355 |
3200 | 356 |
3250 | 359 |
3300 | 360 |
3350 | 361 |
3400 | 362 |
3450 | 363 |
3500 | 364 |
3550 | 365 |
3600 | 366 |
3650 | 367 |
3700 | 368 |
3750 | 369 |
3800 | 373 |
3850 | 387 |
3870 | 397 |
5000 | 406 |
5040 | 435 |
5100 | 436 |
6000 | 548 |
7000 | 590 |
8000 | 630 |
Description
The Sign, does not use the Message ID to select which message to display. There is a Mapping table for
object message ids
(parameter of the objects) toobject message ids
(the ones in the text editor).A lot of element does not have a match corresponding in the text editor. Which makes it very weird. I was hopping to have a clear match between the Sign first parameter value and the text. But sometime I can't found the matching correspondance in the table
Some weird sign I do not understand the mapping:
Extracted and formatted table
0x0208eeec
, it seems to be a table ofshort
with a size of 196.