by viraptor · 15y ago · 0 comments
if (*(int*)(local2 + global0) == 0x4550) {
local5 = *(unsigned short*)(local2 + global0 + 20);
Either local2 or global0 are pointers to a structure. Neither is detected. Most sensible decompilers would change the names and just make it `local5 = global0[local2].blah` instead. Advanced decompilers also can avoid gotos in almost any case. It also uses function calls without parameters or output, assuming some stack layout probably.It's a really really bad output, not a result of obscured compilation.
Stating the function type explicitly also helps it display the right arguments given to it. This output could be significantly improved if the assembly version were available as well.