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.

Problem To animate olly debugee from thread function

Featured Replies

Posted

Hey every one,

I'm experiencing a coding problem with ollydbg.

When i call an animation function from main plugin thread, it works. (of course it will work smile.png). and here is a piece of correctly working code:


void ODBG_Pluginaction(int Origin, int Action, void* pItem) {
if(Origin == PM_DISASM) {
switch(Action) {
case 0:
Go(Getcputhreadid(), 0, STEP_OVER, false, true);
break;
}
}
}

but if i call the same function from a thread it doesn't work (and here's a non working code):


DWORD WINAPI ThreadFunc(LPVOID dd) {
Go(Getcputhreadid(), 0, STEP_OVER, false, true);
return TRUE;
}void ODBG_Pluginaction(int Origin, int Action, void* pItem) {
DWORD id = 0;
if(Origin == PM_DISASM) {
switch(Action) {
case 0:
CreateThread(0, 0, ThreadFunc, 0, 0, &id);
break;
}
}
}

I tried to suspend debugee threads before animating -> no luck;

I tried to use WaitForSingleObject after creating an event that I unset immediatly after calling animation function and set it from main plugin thread -> no luck (the example is a bit complexe)

Any help would be welcome,

Thank you.

I don't know what 'Go(...)' actually does, but maybe it fires a 'SendMessage'

somewhere, while it should use a 'PostMessage' from another (non-ui- !) thread

just to prevent deadlocks. Just a guess..

Hi

Why want to use a Thread?

Ollyscript or Olly Maschine use not a Tread

add in your code

Animate(ANIMATE_IN);

inline void CVM::DoAnimateInto()
{
Animate(ANIMATE_IN);
Go(Getcputhreadid(), 0, STEP_IN, 0, 1);
ReturnToOD();
}

ANIMATE_IN was only an example

ANIMATE_OFF No animation

ANIMATE_IN Animate into

ANIMATE_OVER Animate over

ANIMATE_RET Execute till RET

ANIMATE_SKPRET Execute till RET, then skip RET instruction

ANIMATE_USER Execute till user code

ANIMATE_TRIN Run trace in

ANIMATE_TROVER Run trace over

ANIMATE_STOP Gracefully stop animation

OllyMaschine source can you found here

http://www.luocong.com/om/

Edited by ragdog

  • Author

@ufo: YOU'RE RIGHT

thanks for the clue, I'll digg a bit in this direction

Edited by Zool@nder

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.