Closed pgarba closed 1 year ago
Hi,
I tested goomba on a simple program and it seems to fail to detect MBAs within a compare and return.
*MBA: 2 (a2 & a1) + (a2 ^ a1) , (a1 + a2)**
Before:
__int64 __fastcall test(int a1, int a2) { if ( a2 + a1 == 2 * (a2 & a1) + (a2 ^ a1) ) return (2 * (a2 & a1) + (a2 ^ a1)); else return (3 * (2 * (a2 & a1) + (a2 ^ a1))); }
After goomba:
__int64 __fastcall test(int a1, int a2) { if ( a2 + a1 == 2 * (a2 & a1) + (a2 ^ a1) ) // Failed to detect MBA here return (2 * (a2 & a1) + (a2 ^ a1)); // Failed to detect this MBA else return (3 * a2 + 3 * a1); // This MBA got simplified }
Expected result after goomba:
__int64 __fastcall test(int a1, int a2) { if ( a2 + a1 == a2 + a1 ) return (a1 + a2) else return (3 * (a1 + a2)); }
Do you think you can attach a sample binary so the author can test with?
https://github.com/pgarba/Saturn_Results/blob/master/op1/op1.exe
Hi,
I tested goomba on a simple program and it seems to fail to detect MBAs within a compare and return.
*MBA: 2 (a2 & a1) + (a2 ^ a1) , (a1 + a2)**
Before:
After goomba:
Expected result after goomba: