if ( NULL == in || 0 == insize || NULL == pattern || 0 == patternsize || insize < patternsize ) { goto GetCharacterAddr_exit; } p = in; while ( p + patternsize <= in + insize ) { for ( i = 0; i < patternsize; i++ ) { if ( NULL != wildcard ) { if ( *wildcard != pattern && p != pattern ) { p++; break; } } else { if ( p != pattern ) { p++; break; } } } /* end of for */ if ( i == patternsize ) { addr = p; break; } } /* end of while */
////////////////////////////////////////////////////////////////// // This is a loader for Skype which allows its usage with softice // v2 : look 'n replace done // tested with 1.2.0.48, 1.4.0.78, 2.0.0.69, 2.0.0.90 //////////////////////////////////////////////////////////////////
/* JUST FOR REFERENCE :
1.2.0.48 : 00D0BF72 74 1A JE SHORT Skype_1_.00D0BF8E 00D0BF74 6A 00 PUSH 0 00D0BF76 68 2CCBD000 PUSH Skype_1_.00D0CB2C ; ASCII "Skype" 00D0BF7B 68 34CBD000 PUSH Skype_1_.00D0CB34 ; ASCII "Skype is not compatible with system debuggers like SoftICE." 00D0BF80 6A 00 PUSH 0 00D0BF82 E8 A1C56FFF CALL <JMP.&user32.MessageBoxA> 00D0BF87 6A 00 PUSH 0 00D0BF89 E8 92B96FFF CALL <JMP.&kernel32.ExitProcess> 00D0BF8E B9 78CBD000 MOV ECX,Skype_1_.00D0CB78 ; ASCII "Starting .."
1.4.0.78 : 00B35DF6 74 1A JE SHORT Skype_1_.00B35E12 00B35DF8 6A 00 PUSH 0 00B35DFA 68 3C6EB300 PUSH Skype_1_.00B36E3C ; ASCII "Skype" 00B35DFF 68 446EB300 PUSH Skype_1_.00B36E44 ; ASCII "Skype is not compatible with system debuggers like SoftICE." 00B35E04 6A 00 PUSH 0 00B35E06 E8 052C8DFF CALL <JMP.&user32.MessageBoxA> 00B35E0B 6A 00 PUSH 0 00B35E0D E8 F61F8DFF CALL <JMP.&kernel32.ExitProcess> 00B35E12 B9 886EB300 MOV ECX,Skype_1_.00B36E88 ; ASCII "Starting .."
2.0.0.69 : 0xb6eb7a 00B76F41 74 1A JE SHORT Skype_2_.00B76F5D 00B76F43 6A 00 PUSH 0 00B76F45 68 887FB700 PUSH Skype_2_.00B77F88 ; ASCII "Skype" 00B76F4A 68 907FB700 PUSH Skype_2_.00B77F90 ; ASCII "Skype is not compatible with system debuggers like SoftICE." 00B76F4F 6A 00 PUSH 0 00B76F51 E8 DA1B89FF CALL <JMP.&user32.MessageBoxA> 00B76F56 6A 00 PUSH 0 00B76F58 E8 A30F89FF CALL <JMP.&kernel32.ExitProcess> 00B76F5D B9 D47FB700 MOV ECX,Skype_2_.00B77FD4 ; ASCII "Starting .."
2.0.0.90 : 0xb74896 00B7CC69 74 1A JE SHORT Skype.00B7CC85 00B7CC6B 6A 00 PUSH 0 00B7CC6D 68 B4DCB700 PUSH Skype.00B7DCB4 ; ASCII "Skype" 00B7CC72 68 BCDCB700 PUSH Skype.00B7DCBC ; ASCII "Skype is not compatible with system debuggers like SoftICE." 00B7CC77 6A 00 PUSH 0 00B7CC79 E8 B2BE88FF CALL <JMP.&user32.MessageBoxA> 00B7CC7E 6A 00 PUSH 0 00B7CC80 E8 7BB288FF CALL <JMP.&kernel32.ExitProcess> 00B7CC85 B9 00DDB700 MOV ECX,Skype.00B7DD00 ; ASCII "Starting .."
fprintf(stderr, "OpenFile... "); if (OpenFile(buf, &ofs, OF_EXIST) == HFILE_ERROR) { ERRORMSG("Skype.exe not found in current directory...exiting!") return 1; } fprintf(stderr, "OK\n");