Open InusualZ opened 1 year ago
sp9
is implicit. Looking at the code you can see that sp10 is at least 0x10 big, and sp8 is at least 0x4 big:
memcpy(&sp10, data, 0x10); // copy 16 bytes from data into sp10 -> sp10 must be at least 16 bytes big, e.g. u8 sp10[16];
memcpy(&sp8, &sp10, 4); // copy 4 bytes from sp10 into sp8 -> sp8 must be at least 4 bytes big, e.g. u8 sp8[4];
This means that
temp_r0_2 = (sp8 << 8) | sp9;
would be
temp_r0_2 = (sp8[0] << 8) | sp8[1];
Are you expecting m2c to create a variable for sp9
(which isn't a real variable) or to know that sp8 is at least size 4, therefore should be a byte array of 4?
Bug
In the decompilation, you see this line:
but the variable
sp9
its never declared.Decompilation
Assembly:
Context