//***************************************************************************** //* prefix S equals search data, R equals replace data * //* Two bytes per character: * //* 0x00xx means match or replace * //* 0xFFFF means we don't care what the byte is * //* 0xFFFE means end of search string * //* The first byte is the current byte offset to compare within the string * //* The second byte contains the status of the search * //***************************************************************************** #define PATCH_TOTAL 3 uChar sd1[] = {0x02, \ 0x00, 0x83, 0x00, 0xc4, \ 0x00, 0x08, 0x00, 0x85, \ 0x00, 0xc0, 0x00, 0x0f, \ 0x00, 0x85, 0x00, 0xa9, \ 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x8d, \ 0x00, 0x95, 0x00, 0x28, 0xFF, 0xFE}; uChar rd1[] = {0x02, \ 0x00, 0x83, 0x00, 0xc4, \ 0x00, 0x08, 0x00, 0xe9, \ 0x00, 0xcc, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0xff, 0xff, 0xFF, 0xFE}; uChar sd2[] = {0x02, \ 0x00, 0xbe, 0x00, 0xf4, \ 0x00, 0x11, 0x00, 0x41, \ 0x00, 0x00, 0x00, 0x8d, \ 0x00, 0x84, 0x00, 0x24, \ 0x00, 0x8c, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x8a, 0x00, 0x10, \ 0x00, 0x8a, 0x00, 0xca, \ 0x00, 0x3a, 0x00, 0x16, 0xFF, 0xFE}; uChar rd2[] = {0x02, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0x00, 0xe9, 0x00, 0x90, \ 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0xff, 0xff, 0xFF, 0xFE}; uChar sd3[] = {0x02, \ 0x00, 0xbe, 0x00, 0xb4, \ 0x00, 0xf1, 0x00, 0x40, \ 0x00, 0x00, 0x00, 0x8d, \ 0x00, 0x84, 0x00, 0x24, \ 0x00, 0x8c, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x8a, 0x00, 0x10, \ 0x00, 0x8a, 0x00, 0xca, \ 0x00, 0x3a, 0x00, 0x16, 0xFF, 0xFE}; uChar rd3[] = {0x02, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0xff, 0xff, 0xff, 0xff, \ 0x00, 0xe9, 0x00, 0x9c, \ 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0xff, 0xff, 0xFF, 0xFE}; //***************************************************************************** //* The list of pointers to the search and replace data * //***************************************************************************** const uChar *Patch1[] = {(uChar *)sd1, (uChar *)rd1, 0}; const uChar *Patch2[] = {(uChar *)sd2, (uChar *)rd2, 0}; const uChar *Patch3[] = {(uChar *)sd3, (uChar *)rd3, 0}; //***************************************************************************** //* A list of files to search and replace data in * //* Note: PatchData is compared in every file (so make unique). * //***************************************************************************** struct _patch_info_ { char *FileName; uChar **pArray; } PatchData[] = { // {"dkserve.exe", Patch1}, {"defrag\\dkntfs.exe", Patch2}, // {"defrag\\dkfat.exe", Patch3}, {0, 0} };