You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// WARNING: Variable defined which should be unmapped: var_8hundefined4main(void)
{
int32_tiVar1;
undefined4*puVar2;
char*s2;
undefined4uStack_dc;
undefined4uStack_d8;
chars1 [100];
charvar_70h [100];
intvar_ch;
int32_tvar_8h;
sym.___main();
sym._printf("Input the password: ");
sym._scanf(data.00403039, s1+0x5c);
uStack_dc=0x73373030;
uStack_d8=0x72657075;
s1[0] ='s';
s1[1] ='p';
s1[2] ='y';
s1[3] ='\0';
puVar2= (undefined4*)(s1+4);
for (iVar1=0x16; iVar1!=0; iVar1=iVar1+-1) {
*puVar2=0;
puVar2=puVar2+1;
}
iVar1=sym._strcmp(&uStack_dc, s1+0x5c);
if (iVar1==0) {
sym._puts(data.0040303c);
} else {
sym._puts("Not ok!");
}
sym.__getch();
return0;
}
as u can see s1 is starting at stack -0xd4 and then gets the string value assigned as dwords, but it only gets one of those correct (still at the false index) and then also fucks something up with the var_70h variable which should get passed into the strcmp and scanf function. So yeah not sure what exactly gets fucked, but the ghidra decompiler doesnt use the same variables as rizin. If I analyze the crackme with ghidra and edit the variable types the same way ghidra will display the function how i would expect it.
For this small windows crack me, the ghidra decompile output is just not getting the correct stack variables, below is the pdf output:
and pdg output:
as u can see s1 is starting at stack -0xd4 and then gets the string value assigned as dwords, but it only gets one of those correct (still at the false index) and then also fucks something up with the var_70h variable which should get passed into the strcmp and scanf function. So yeah not sure what exactly gets fucked, but the ghidra decompiler doesnt use the same variables as rizin. If I analyze the crackme with ghidra and edit the variable types the same way ghidra will display the function how i would expect it.
exe, password is
crackmes.one
The text was updated successfully, but these errors were encountered: