pastebin - collaborative debugging tool
eathena.kpaste.net RSS


Yommy
Posted by Anonymous on Sat 5th Nov 2011 05:17
raw | new post

  1. <?php
  2.         function DisableHShield ($exe) {
  3.                 if ($exe === true) {
  4.                         return "[Fix]_Disable_HShield_(Recommended)";
  5.                 }
  6.                
  7.                 $code =  "\xE8\xAB\xAB\xAB\xFF"         // call    LoadAhnLab
  8.                         ."\x85\xC0"                     // test    eax, eax
  9.                         ."\x74\xAB"                     // jz      short loc_73FEF9
  10.                         ."\xE8\xAB\xAB\xAB\xFF"         // call    AudioInit
  11.                         ."\x85\xC0"                     // test    eax, eax
  12.                         ."\x74\xAB";                    // jz      short loc_73FEF9
  13.                 $offset = $exe->code($code, "\xAB");
  14.                 if ($offset === false) {
  15.                         echo "Failed in part 1";
  16.                         return false;
  17.                 }
  18.                 $exe->replace($offset, array(0 => "\xEB\x0B\x90\x90\x90"));
  19.                 // patch call to LoadAhnLab with jmp to call AudioInit
  20.  
  21.                 $section = $exe->getSection(".rdata");
  22.                 if($section === false) {
  23.                         echo "Failed in part 3";
  24.                         return false;
  25.                 }
  26.                 // remove ahnlab dll from import table
  27.                 $aOffset = $exe->match("aossdk.dll\x00\x00");
  28.                 if ($aOffset === false) {
  29.                         echo "Failed in part 4";
  30.                         return false;
  31.                 }
  32.                 $virtual = $section->vOffset - $section->rOffset;
  33.                 $aOffset += $virtual;
  34.                 $code = "\x00\xAB\xAB\xAB\x00\x00\x00\x00\x00\x00\x00\x00\x00".pack("I", $aOffset);
  35.                 $offset = $exe->match($code, "\xAB", $section->rOffset, $section->rOffset+$section->rSize);
  36.                 if ($offset === false) {
  37.                         echo dechex($aOffset) ."  # Failed in part 5";
  38.                         return false;
  39.                 }
  40.                
  41.                 $data2 = $exe->read($offset + 21, 19) . str_repeat("\x00", 20);
  42.                 $exe->replace($offset, array(1 => $data2));
  43.  
  44.                 return true;
  45.         }
  46. ?>

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at