haxchi/haxchi_code/source/constants.h
2016-11-06 17:11:18 -08:00

72 lines
3.0 KiB
C

#ifndef CONSTANTS_H
#define CONSTANTS_H
#define CCR_MEMCPY 301478892
#define CCR_MEMSET 301479048
#define CCR_STRNCPY 301481600
#define CCR_MOV_R0R4_POP_R4PC 301461596
#define CCR_LDR_R0R0x8_BLX_R3_POP_PC 301138616
#define CCR_ROP_R4R5R6R7R8PC 300950884
#define CCR_ROP_R4R5R6R7PC 300949720
#define CCR_MOV_R0R7_MOV_R1R8_MOV_R2R4_BLX_R5 301028284
#define CCR_MOV_R1R8_MOV_R2R4_BLX_R5 ((CCR_MOV_R0R7_MOV_R1R8_MOV_R2R4_BLX_R5 + 0x4))
#define CCR_BLX_R2_POP_R4PC 301137492
#define CCR_BLX_R6_POP_R4R5R6PC 301004128
#define CCR_BLX_R4 300999020
#define CCR_STR_R0R4x24_POP_R4PC 301277360
#define CCR_STR_R3R5x24_POP_R4R5PC 301294364
#define CCR_POP_R4PC 301277364
#define CCR_LDR_R0R5x18_BLX_R7 301319000
#define CCR_POP_R4R5PC 301139088
#define CCR_POP_R3R5PC 301159067
#define CCR_POP_R4R5R6PC 301004132
#define CCR_POP_R4R5R6R7PC 300949720
#define CCR_POP_PC 300948676
#define CCR_LDR_R0R7_POP_R4R5R6R7R8R9R10PC 301375148
#define CCR_MOV_R0R9_POP_ADD_SPxC_R4R5R6R7R8R9R10R11PC 301365520
#define CCR_LDM_SPR0R1_ADD_SPx14_POP_R4R5R6R7R8R9R10R11LR_BX_LR 301485876
#define CCR_MVNSNE_SPR4RORx13_BX_LR 301204712
#define CCR_CMP_R3x0_POPEQ_PC_BLX_R3_POP_PC 300999264
#define CCR_BLX_R4_POP_R4R5PC 301016140
#define CCR_IOCTL_RET 301232392
#define CCR_NFC_STACKTOP 303204396
#define CCR_NFC_STACKSIZE 51168
#define ROP_INITIAL_START_LR ((CCR_NFC_STACKTOP - 0x20 - (9 * 0x4 + 0x4) - 0x4))
#define ROP_INITIAL_START ((ROP_INITIAL_START_LR + 0x4 + 0x8))
#define CCR_FSA_HANDLE 301957260
#define CCR_ROP_SVC_6 301477528
#define CCR_ROP_SVC_CREATETHREAD 301477480
#define CCR_ROP_SVC_IOCTL 301477928
#define CCR_ROP_SVC_IOCTLV 301477936
#define CCR_ROP_SVC_STARTTHREAD 301477536
#define CCR_ROP_SVC_CREATEMESSAGEQUEUE 301477576
#define CCR_ROP_SVC_JAMMESSAGEQUEUE 301477600
#define CCR_ROP_SVC_CREATEHEAP 301477760
#define CCR_ROP_SVC_FREEANDCLEAR 301477816
#define CCR_ROP_SVC_4F 301478112
#define CCR_ROP_SVC_RESOURCEREPLY0 301478064
#define CCR_POP_R4LR_ROP_SVC_4F 301226192
#define CCR_ROP_ALLOC_IOCTLBUF 301462868
#define CCR_ROP_START 301232500
#define KERNEL_SVC_81_HANDLER 135449900
#define KERNEL_READ_OTP 135397960
#define KERNEL_SET_DOMAIN 135457296
#define KERNEL_DOMAIN_TABLE 135938048
#define KERNEL_MEMCPY 135470340
#define KERNEL_STRNLEN 135473816
#define KERNEL_INVALIDATE_ICACHE 135453936
#define FRAMEBUFFER_VA 0xF4000000
#define FRAMEBUFFER_PA 0
#define FRAMEBUFFER_SIZE 7372800
#define ROP_SECONDARY_SIZE 4096
#define ROP_SECONDARY_SRCBUF_VA 671088640
#define ROP_SECONDARY_SRCBUF_PA (ROP_SECONDARY_SRCBUF_VA - 0x10000000 + 0x50000000)
#define ROP_SECONDARY_DSTBUF (CCR_NFC_STACKTOP - CCR_NFC_STACKSIZE)
#define DATABUFFER_VA ROP_SECONDARY_SRCBUF_VA+0x2000
#define DATABUFFER_PA (DATABUFFER_VA - 0x10000000 + 0x50000000)
#define CCR_SHELLCODE_DST 0x11F85800
#define MCP_SHELLCODE_DST 0x05059900
#define SHELLCODE_SRC_VA ((ROP_SECONDARY_SRCBUF_VA+0x3000))
#define SHELLCODE_SRC_PA (SHELLCODE_SRC_VA - 0x10000000 + 0x50000000)
#define SHELLCODE_DST 0xFFFFEC00
#endif