Environment information
To put it simple i wrote a simple crack me and cracked it with x64 a couple of hours later i looked into the exe with cutter and cutter did show me instead of the jge , jle , jne that it detected this region of the exe as:
" ;-- str.This_is_not_the_right_number:
.string "\n This is not the right number \n"
To Reproduce
using namespace std;
int main(){
int a;
int b = 3645;
int c = 3452;
int d = 3546;
// "right" number is 10643
cout << "please enter a number";
cin >> a;
cout << "your number is" << a ;
if(a > b+c+d)
{
cout<< "\n This is not the right number \n";
}
if(a < b+c+d)
{
cout<< "\n This is not the right number \n";
}
if(a == b+c+d)
{
cout<< "\n This is not the right number \n";
}
}
please enter a number
your number is
This is not the right number
Expected behavior
The expected behavior is that it will output this gibberish:
;-- section..rdata:
0x00404000 add byte [rax + 0x6c], dh ; [02] -r-- section size 4096 named .rdata
0x00404001 ;-- str.please_enter_a_number:
0x00404001 .string "please enter a number" ; len=22
0x00404017 ;-- str.your_number_is:
0x00404017 .string "your number is" ; len=15
0x00404026 add byte [rax], al
0x00404028 ;-- str.This_is_not_the_right_number:
0x00404028 .string "\n This is not the right number \n" ; len=33
instead of:
for example:
00000000004015C8 | 39C2 | cmp edx,eax | edx:EntryPoint, eax:EntryPoint
-- | -- | -- | --
00000000004015CA | 7D 13 | jge cuttertest.4015DF | 聽
00000000004015CC | 48:8D15 552A0000 | lea rdx,qword ptr ds:[404028] | rdx:EntryPoint, 0000000000404028:"\n This is not the right number \n"
Screenshots
both:
x64 dbg:
cutter:
Additional context
Hopefully this is not a misunderstanding and i am missing something :) anyway hopefully this cleared up.
Thank you! I didn't read the issue yet, but can you please share the exact binary file you used? It's better than compiling by ourselves because we would want to have an environment as similar to yours.
Seems like you're looking at the data section that contains the strings, and not at the code section. Use the functions list at the left to navigate between the functions. Otherwise, you can X-Ref the usage of these string by navigating to them and pressing X, either on the list of Strings or on the places you should in your screenshot
So i was missing something. Works like a charm now :) maybe you guys could add a tooltip or something for reversing noobs like me.
Anyway thank you ITAYC0HEN i can now switch from x64 dbg to cutter i am happy now.
Thank you clearing this up and i hope you have a nice week.
Most helpful comment
Seems like you're looking at the data section that contains the strings, and not at the code section. Use the functions list at the left to navigate between the functions. Otherwise, you can X-Ref the usage of these string by navigating to them and pressing X, either on the list of Strings or on the places you should in your screenshot