Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ollydbg load source code

Featured Replies

Posted

I am a beginner in c++ but i noticed that when i wrote a c++ dll and then loaded it into olly so i could check if everything worked, it would also display the source of what every operand does.

It happens completely automatic however this time it does not, so how can i load my source code into olly?

thanks

You have to generate debug data. There should be an option inside whatever compiler you're using.

This will generate .pdb files Olly can read the source/symbols from.

  • Author

The pdb file is in the same folder (the release folder from visual studio) where the actual dll file is located, how do i load it into olly?

Debug > select symbol path, didn't seem to work.

Olly automatically loads pdb files from the same folder as the debuggee.

You shouldnt have to set any extra options if it worked before :s

Perhaps your debug data is out of date and Olly checks against an md5 or something. I'm not that familiar with the pdb format tbh.

Try deleting the pdb and recompiling, otherwise upload the file + pdb somewhere if it's not topsecret **** :D

  • Author
Olly automatically loads pdb files from the same folder as the debuggee.

You shouldnt have to set any extra options if it worked before :s

Perhaps your debug data is out of date and Olly checks against an md5 or something. I'm not that familiar with the pdb format tbh.

Try deleting the pdb and recompiling, otherwise upload the file + pdb somewhere if it's not topsecret **** :D

Ahh i get it now, the pdb loads everything under view > source files and all the files are absent because it was compiled on an former windows installation.

it's not secret :P It's a very boring detour ;) but maybe you can help me with it :P

This is probably the worst code you will ever see, i am currently using a counter that when count == 11 return and it works but i am not happy with that, That's just bad coding :(

int (__cdecl *sub_check_o)(int x);
string zxc = "";
size_t found;
int __cdecl sub_check(int x)
{
__asm
{
pushad
mov zxc, eax
} found = zxc.find("test", 0); if (found == string::npos)
{
__asm
{
popad
}
return sub_check_o(x);
}
else
{
__asm
{
popad
}
return;
}
}
Olly automatically loads pdb files from the same folder as the debuggee.

You shouldnt have to set any extra options if it worked before :s

Perhaps your debug data is out of date and Olly checks against an md5 or something. I'm not that familiar with the pdb format tbh.

Try deleting the pdb and recompiling, otherwise upload the file + pdb somewhere if it's not topsecret **** :D

Ahh i get it now, the pdb loads everything under view > source files and all the files are absent because it was compiled on an former windows installation.

it's not secret :P It's a very boring detour ;) but maybe you can help me with it :P

This is probably the worst code you will ever see, i am currently using a counter that when count == 11 return and it works but i am not happy with that, That's just bad coding :(

int (__cdecl *sub_check_o)(int x);
string zxc = "";
size_t found;
int __cdecl sub_check(int x)
{
__asm
{
pushad
mov zxc, eax
} found = zxc.find("test", 0); if (found == string::npos)
{
__asm
{
popad
}
return sub_check_o(x);
}
else
{
__asm
{
popad
}
return;
}
}
int (__cdecl *sub_check_o)(int x);
string zxc = "";
size_t found;
int __cdecl sub_check(int x)
{
found = zxc.find("test", 0); if (found == string::npos)
return sub_check_o(x);
return 0;
}

If you redirect a call, you don't have to popad/pushad.

Also you don't even need popad/pushad with a non call redirection.

My method is

void HandleHere()
{
//Real code here
}
void RedirectHere()
{
HandleHere();
_asm
{
jmp Return
}
}

(Haven't used it in awhile, you may need to change the calling convention)

Of course you can do this 100s of ways. That personally is how I like doing it.

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.