View Single Post
  #8  
Old 05-13-2006, 14:12
TQN TQN is offline
VIP
 
Join Date: Apr 2003
Location: Vietnam
Posts: 358
Rept. Given: 143
Rept. Rcvd 24 Times in 13 Posts
Thanks Given: 196
Thanks Rcvd at 168 Times in 51 Posts
TQN Reputation: 24
As I see in the ASM code, I think we only need to patch at 005580F1, from JNZ MSN.005582AC to JMP MSN.005582AC.
The C pesudo-code can be:
Code:
HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, "MSNMSGR");
if (NULL == hEvent)
    goto Error; // At addr 005582B3
else
{ 
    if (ERROR_ALREADY_EXISTS /* = 0xB7 */ != GetLastError())
        goto StartNewInstance; // At addr 005582AC
    else
    {
        // Wait until the first instance of MSN exited
        if (WAIT_FAILED /* = -1 */ == WaitForSingleObject(hEvent, INFINITE /* = -1 */))
            goto Error; // addr 005582B3
        FindWindow("MSNMSGRBlObj", NULL);
        // ..............
        // ..............
    }
}
Regards,
Reply With Quote