Advertisement
Reisyukaku

Spider.h

Feb 6th, 2015
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.16 KB | None | 0 0
  1. #define START_SECTION __attribute__ ((section (".text.start"), naked))
  2.  
  3. int(*IFopen)(void *this, const short *path, int flags) = 0x0022FE08;
  4. int(*IFread)(void *this, unsigned int *read, unsigned int *buffer, unsigned int len) = 0x001686DC;
  5. int(*IFwrite)(void *this, unsigned int *written, void *src, unsigned int len) = 0x00168764;
  6. int (*GX_SetTextureCopy)(void *input_buffer, void *output_buffer, unsigned int size, int in_x, int in_y, int out_x, int out_y, int flags) = 0x0011DD48;
  7. int (*GSPGPU_FlushDataCache)(void *addr, unsigned int len) = 0x00191504;
  8. int (*svcSleepThread)(unsigned long long nanoseconds) = 0x0023FFE8;
  9. void IFseek(void* handle, int off);
  10. void *memcpy(void *destination, const void *source, int num);
  11.  
  12. int START_SECTION uvl_start (){
  13.     __asm__ volatile (".word 0xE1A00000");
  14.     payload();
  15.     __asm__ volatile ("bx lr");
  16. }
  17.  
  18. void IFseek(void* handle, int off){
  19.     *((int *)handle + 1) = off;
  20. }
  21.  
  22. void *memcpy(void *destination, const void *source, int num){
  23.     unsigned char *dest = destination;
  24.     unsigned char *src  = (unsigned char*)source;
  25.     while (num) {
  26.         *dest++ = *src++;
  27.         num--;
  28.     }
  29.     return destination;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement