MrRockchip

ucode-decoder.c

Aug 21st, 2018 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 10.61 KB | None | 0 0
  1. /* === UCODE DECODER TO BIN === */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <inttypes.h>
  6.  
  7. // Encrypt Patch code 05000119 for 5020 and equivalent"USAGE: %s output_file\n", argv[0]);
  8.           fflush(stdout);
  9.     }
  10.     else {
  11.       if ( ( pFile = fopen( argv[1] , "wb" ) ) != NULL ) {
  12.           setvbuf(pFile, NULL, _IONBF, 0); // disable buffering
  13.           fwrite(CpuF14MicrocodePatch05000119, sizeof(CpuF14MicrocodePatch05000119), 1, pFile);
  14.             fflush(pFile);
  15.               fclose (pFile);
  16.           return 0;
  17.       }
  18.       else {
  19.           fprintf(stdout, "ERROR: cant open %s\n", argv[0]);
  20.             fflush(stdout);
  21.               return 1;
  22.       }
  23.   }
  24.   return 0;
  25. }
Add Comment
Please, Sign In to add comment