Post: [SPRX] Writing into CoD locations [non host stuff]
07-26-2014, 10:59 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hello guys , today i wanna release a func to write into cod locations so you can use laser redboxes and all this stuffSmile i worked rllllly hard like 3 days !! Yep if u dont use this an try to set it without the sys call your sprx will crash / freeze so i am rlly happy that it works ! enjoy guys


Function: [its a sys call]
    int32_t write_process(uint64_t ea, const void * data, uint32_t size)
{
// 905 = sys_call number
//sys_process_getpid() = pid
// ea = offset
// size = lenght of the bytes
//data = bytes
system_call_4(905, (uint64_t)sys_process_getpid(), ea, size, (uint64_t)data);
return_to_user_prog(int32_t);
}

How to use: [red boxes]
    
uint32_t bytes[1]; // uint32_t = Uint32[]
bytes[0] = 0x38C0FFFF; // bytes for red boxes = 0x38,0xC0,0xFF,0xFF
write_process(0x000834D0, &bytes, 4); // first argutment = offset │ second are the variable │ thiird the
//lenght of the bytes so 0x38 will be 1 and 0x0F0F will be 2



Credits:
Me -
BlackPanther
PS3Wiki - Syscalls
Last edited by EnVatoHD ; 07-26-2014 at 11:40 PM.

The following 7 users say thank you to EnVatoHD for this useful post:

-JM-, Arrow_Modz, LaRip8, John, Notorious, VezahMoDz, xPAQz
07-28-2014, 03:44 AM #11
from bitwise
    
quartal-deutscher swag

#pragma region Memonic
typedef float vec;
typedef unsigned char byte;
typedef signed char sbyte;
typedef unsigned short ui16;
typedef signed short i16;
typedef unsigned int ui32;
typedef signed int i32;
typedef unsigned long long ui64;
typedef signed long long i64;
typedef char* string;
typedef struct{float x, y;}vec2;
typedef struct{float x, y, z;}vec3;
typedef struct{float x, y, z, w;}vec4;
typedef enum:int{MEM_READ,MEM_WRITE}mem_s;
#define VEC2_LEN 2
#define VEC3_LEN 3
#define VEC4_LEN 4
#define BYTE_MAX 0x7F
#define INT16_MAX 0x7FFF
#define INT32_MAX 0x7FFFFFFF
#define INT64_MAX 0x7FFFFFFFFFFFFFFF
#define writeVec(address, len, startx) for(int i = 0, f = 0; i < len; i++, f += 4){*(vec*)((address)+f) = (startx)[i];}
#define readVec(address, len, startx) for(int i = 0, f = 0; i < len; i++, f += 4){(startx)[i] = *(vec*)((address)+f);}
#pragma endregion
namespace Data
{
typedef enum : int {OR,XOR,AND,NAND,NOR,NOT,SHIFT_LEFT,SHIFT_RIGHT}bit;
vec Single(i32 address, mem_s mem, vec value = 0.0)
{
if(mem)
*(vec*)(address) = value;
return 0.0;
return *(vec*)(address);
}
double Double(i32 address, mem_s mem, double value = 0.00)
{
if(mem)
*(double*)(address) = value;
return 0.00;
return *(double*)(address);
}
byte Byte(i32 address, mem_s mem, byte value = 00)
{
if(mem)
*(byte*)(address) = value;
return 00;
return *(byte*)(address);
}
sbyte SByte(i32 address, mem_s mem, sbyte value = 0x00)
{
if(mem)
*(sbyte*)(address)=value;
return 0;
return *(sbyte*)(address);
}
ui16 UInt16(i32 address, mem_s mem, ui16 value = 0x0000)
{
if(mem)
*(ui16*)(address)=value;
return 0x0000;
return *(ui16*)(address);
}
i16 Int16(i32 address, mem_s mem, i16 value = 0x0000)
{
if(mem)
*(i16*)(address)=value;
return 0x0000;
return *(i16*)(address);
}
ui32 UInt32(i32 address, mem_s mem, ui32 value = 0x00000000)
{
if(mem)
*(ui32*)(address) = value;
return 0x00000000;
return *(ui32*)(address);
}
i32 Int32(i32 address, mem_s mem, i32 value = 0x00000000)
{
if(mem)
*(i32*)(address) = value;
return 0x00000000;
return *(i32*)(address);
}
ui64 UInt64(i32 address, mem_s mem, ui64 value = 0x0000000000000000)
{
if(mem)
*(ui64*)(address) = value;
return 0x0000000000000000;
return *(ui64*)(address);
}
i64 Int64(i32 address, mem_s mem, i64 value = 0x0000000000000000)
{
if(mem)
*(i64*)(address) = value;
return 0x0000000000000000;
return *(ui64*)(address);
}
string String(i32 address, mem_s mem, string value = "")
{
if(mem)
strncpy((char*)(address), value, strlen(value));
return "";
return (char*)(address);
}
vec2 Vec2(i32 address, mem_s mem, vec2 value = *(vec2*)0)
{
if(mem&&value.x)
writeVec(address, VEC2_LEN, &value.x);
return *(vec2*)0;
vec2 val;
readVec(address,VEC2_LEN,&val.x)
return val;
}
vec3 Vec3(i32 address, mem_s mem, vec3 value = *(vec3*)0)
{
if(mem&&value.x)
writeVec(address, VEC3_LEN, &value.x);
return *(vec3*)0;
vec3 val;
readVec(address,VEC3_LEN,&val.x)
return val;
}
vec4 Vec4(i32 address, mem_s mem, vec4 value = *(vec4*)0)
{
if(mem&&value.x)
writeVec(address, VEC4_LEN, &value.x);
return *(vec4*)0;
vec4 val;
readVec(address,VEC4_LEN,&val.x)
return val;
}
#pragma region Math ~ Single
vec Add(i32 address, mem_s mem, vec value = 0.0)
{
if(mem&&value)
*(float*)(address) += value;
return 0.0;
return *(float*)(address) + value;
}
vec Sub(i32 address, mem_s mem, vec value = 0.0)
{
if(value > *(vec*)(address)) printf("Basic Math error\n\targument value [%f] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(vec*)(address) -= value;
return 0;
return *(vec*)(address) - value;
}
vec Mul(i32 address, mem_s mem, vec value = 0.0)
{
if(mem&&value)
*(vec*)(address) *= value;
return 0;
return *(vec*)(address) * value;
}
vec Div(i32 address, mem_s mem, vec value = 0.0)
{
if(value > *(vec*)(address)) printf("Basic Math error\n\targument value [%f] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(vec*)(address) /= value;
return 0;
return *(vec*)(address) / value;
}
vec R(i32 address, i32 len) //Get Remander
{
return (vec)(*(i32*)(address) % len);
}
#pragma endregion
#pragma region Math ~ Double
double Add(i32 address, mem_s mem, double value = 0.00)
{
if(mem&&value)
*(double*)(address) += value;
return 0.00;
return *(double*)(address) + value;
}
double Sub(i32 address, mem_s mem, double value = 0.00)
{
if(value > *(double*)(address)) printf("Basic Math error\n\targument value [%f] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(double*)(address) -= value;
return 0.00;
return *(double*)(address) - value;
}
double Mul(i32 address, mem_s mem, double value = 0.0)
{
if(mem&&value)
*(double*)(address) *= value;
return 0;
return *(double*)(address) * value;
}
double Div(i32 address, mem_s mem, double value = 0.00)
{
if(value > *(double*)(address)) printf("Basic Math error\n\targument value [%f] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(double*)(address) /= value;
return 0;
return *(double*)(address) / value;
}
double R(i32 address, double len) //Get Remander
{
return (double)(*(i32*)(address) % (int)floor(len));
}
#pragma endregion
#pragma region Math ~ Byte
byte Add(i32 address, mem_s mem, byte value = 00)
{
if(mem&&value)
*(byte*)(address) += value;
return 00;
return *(byte*)(address) + value;
}
byte Sub(i32 address, mem_s mem, byte value = 00)
{
if(value > *(byte*)(address)) printf("Basic Math error\n\targument value [%02X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(byte*)(address) -= value;
return 00;
return *(byte*)(address) - value;
}
byte Mul(i32 address, mem_s mem, byte value = 00)
{
if(mem&&value)
*(byte*)(address) *= value;
return 0;
return *(byte*)(address) * value;
}
byte Div(i32 address, mem_s mem, byte value = 00)
{
if(value > *(byte*)(address)) printf("Basic Math error\n\targument value [%02X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(byte*)(address) /= value;
return 0;
return *(byte*)(address) / value;
}
byte R(i32 address, byte len) //Get Remander
{
return *(byte*)(address) % len;
}
sbyte Add(i32 address, mem_s mem, sbyte value = 00)
{
if(mem&&value)
*(sbyte*)(address) += value;
return 00;
return *(sbyte*)(address) + value;
}
sbyte Sub(i32 address, mem_s mem, sbyte value = 00)
{
if(value > *(sbyte*)(address)) printf("Basic Math error\n\targument value [%02X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(sbyte*)(address) -= value;
return 00;
return *(sbyte*)(address) - value;
}
sbyte Mul(i32 address, mem_s mem, sbyte value = 00)
{
if(mem&&value)
*(sbyte*)(address) *= value;
return 0;
return *(sbyte*)(address) * value;
}
sbyte Div(i32 address, mem_s mem, sbyte value = 00)
{
if(value > *(sbyte*)(address)) printf("Basic Math error\n\targument value [%02X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(sbyte*)(address) /= value;
return 0;
return *(sbyte*)(address) / value;
}
sbyte R(i32 address, sbyte len) //Get Remander
{
return *(sbyte*)(address) % len;
}
#pragma endregion
#pragma region Math ~ Int16
//unsigned
ui16 Add(i32 address, mem_s mem, ui16 value = 0x0000)
{
if(mem&&value)
*(ui16*)(address) += value;
return 00;
return *(ui16*)(address) + value;
}
ui16 Sub(i32 address, mem_s mem, ui16 value = 0x0000)
{
if(value > *(ui16*)(address)) printf("Basic Math error\n\targument value [%04X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(ui16*)(address) -= value;
return 00;
return *(ui16*)(address) - value;
}
ui16 Mul(i32 address, mem_s mem, ui16 value = 0x0000)
{
if(mem&&value)
*(ui16*)(address) *= value;
return 0;
return *(ui16*)(address) * value;
}
ui16 Div(i32 address, mem_s mem, ui16 value = 0x000)
{
if(value > *(ui16*)(address)) printf("Basic Math error\n\targument value [%04X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(ui16*)(address) /= value;
return 0;
return *(ui16*)(address) / value;
}
ui16 R(i32 address, ui16 len) //Get Remander
{
return *(ui16*)(address) % len;
}
ui16 Bitwise(i32 address, bit bitop, mem_s mem, ui16 value=0x0000)//Bitwise(0x00001234, Data::bit::XOR, mem_s::MEM_WRITE, 0x1234);
{
switch(bitop)
{
case 0://OR
if(mem&&value)
*(ui16*)(address) |= value;
return 0x0000;
return *(ui16*)(address) | value;
case 1://XOR
if(mem&&value)
*(ui16*)(address) ^= value;
return 0x0000;
return *(ui16*)(address) ^ value;
case 2://AND
if(mem&&value)
*(ui16*)(address) &= value;
return 0x0000;
return *(ui16*)(address) & value;//got a bad feeling it's going to go logical :(
case 3://NAND
if(mem&&value)
*(ui16*)(address) = (~*(ui16*)(address) & ~value);
return 0x0000;
return (~*(ui16*)(address) & ~value);
case 4://NOR
if(mem&&value)
*(ui16*)(address) = (~*(ui16*)(address) | ~value);
return 0x0000;
return ~(*(ui16*)(address) | value);
case 5://NOT
if(mem&&value)
*(ui16*)(address) = ~value;
return 0x0000;
if(mem)
*(ui16*)(address) = ~*(ui16*)(address);
return 0x0000;
return ~*(ui16*)(address);
case 6://SHIFT_LEFT
//Use value argument as amount of bits
if(mem&&value>=15)
*(ui16*)(address) <<= ((!value ? 9 : value)&0xFF);
return 0x0000;
return (!(*(ui16*)(address) << (!value ? 9 : value)) ? 0 : *(ui16*)(address) << value);
case 7://SHIFT_RIGHT
if(mem&&value>=15)
*(ui16*)(address) >>= ((!value ? 9 : value)&0xFF);
return 0x0000;
return (!(*(ui16*)(address) >> (!value ? 9 : value)) ? 0 : *(ui16*)(address) << value);

}

}
//signed
i16 Add(i32 address, mem_s mem, i16 value = 0x0000)
{
if(mem&&value)
*(i16*)(address) += value;
return 00;
return *(i16*)(address) + value;
}
i16 Sub(i32 address, mem_s mem, i16 value = 0x0000)
{
if(value > *(i16*)(address)) printf("Basic Math error\n\targument value [%04X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(i16*)(address) -= value;
return 00;
return *(i16*)(address) - value;
}
i16 Mul(i32 address, mem_s mem, i16 value = 0x0000)
{
if(mem&&value)
*(i16*)(address) *= value;
return 0;
return *(i16*)(address) * value;
}
i16 Div(i32 address, mem_s mem, i16 value = 0x000)
{
if(value > *(i16*)(address)) printf("Basic Math error\n\targument value [%04X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(i16*)(address) /= value;
return 0;
return *(i16*)(address) / value;
}
i16 R(i32 address, i16 len) //Get Remander
{
return *(i16*)(address) % len;
}
i16 Bitwise(i32 address, bit bitop, mem_s mem, i16 value=0x0000)//Bitwise(0x00001234, Data::bit::XOR, mem_s::MEM_WRITE, 0x1234);
{
switch(bitop)
{
case 0://OR
if(mem&&value)
*(i16*)(address) |= value;
return 0x0000;
return *(i16*)(address) | value;
case 1://XOR
if(mem&&value)
*(i16*)(address) ^= value;
return 0x0000;
return *(i16*)(address) ^ value;
case 2://AND
if(mem&&value)
*(i16*)(address) &= value;
return 0x0000;
return *(i16*)(address) & value;//got a bad feeling it's going to go logical :(
case 3://NAND
if(mem&&value)
*(i16*)(address) = (~*(i16*)(address) & ~value);
return 0x0000;
return (~*(i16*)(address) & ~value);
case 4://NOR
if(mem&&value)
*(i16*)(address) = (~*(i16*)(address) | ~value);
return 0x0000;
return ~(*(i16*)(address) | value);
case 5://NOT
if(mem&&value)
*(i16*)(address) = ~value;
return 0x0000;
if(mem)
*(i16*)(address) = ~*(i16*)(address);
return 0x0000;
return ~*(i16*)(address);
case 6://SHIFT_LEFT
//Use value argument as amount of bits
if(mem&&value>=15)
*(i16*)(address) <<= ((!value ? 9 : value)&0xFF);
return 0x0000;
return (!(*(i16*)(address) << (!value ? 9 : value)) ? 0 : *(i16*)(address) << value);
case 7://SHIFT_RIGHT
if(mem&&value>=15)
*(i16*)(address) >>= ((!value ? 9 : value)&0xFF);
return 0x0000;
return (!(*(i16*)(address) >> (!value ? 9 : value)) ? 0 : *(i16*)(address) << value);

}

}
#pragma endregion
#pragma region Math ~ Int32
//unsigned
ui32 Add(i32 address, mem_s mem, ui32 value = 0x00000000)
{
if(mem&&value)
*(ui32*)(address) += value;
return 00;
return *(ui32*)(address) + value;
}
ui32 Sub(i32 address, mem_s mem, ui32 value = 0x00000000)
{
if(value > *(ui32*)(address)) printf("Basic Math error\n\targument value [%08X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(ui32*)(address) -= value;
return 00;
return *(ui32*)(address) - value;
}
ui32 Mul(i32 address, mem_s mem, ui32 value = 0x00000000)
{
if(mem&&value)
*(ui32*)(address) *= value;
return 0;
return *(ui32*)(address) * value;
}
ui32 Div(i32 address, mem_s mem, ui32 value = 0x00000000)
{
if(value > *(ui32*)(address)) printf("Basic Math error\n\targument value [%08X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(ui32*)(address) /= value;
return 0;
return *(ui32*)(address) / value;
}
ui32 R(i32 address, ui32 len) //Get Remander
{
return *(ui32*)(address) % len;
}
ui32 Bitwise(i32 address, bit bitop, mem_s mem, ui32 value=0x00000000)//Bitwise(0x00001234, Data::bit::XOR, mem_s::MEM_WRITE, 0x1234);
{
switch(bitop)
{
case 0://OR
if(mem&&value)
*(ui32*)(address) |= value;
return 0x00000000;
return *(ui32*)(address) | value;
case 1://XOR
if(mem&&value)
*(ui32*)(address) ^= value;
return 0x00000000;
return *(ui32*)(address) ^ value;
case 2://AND
if(mem&&value)
*(ui32*)(address) &= value;
return 0x00000000;
return *(ui32*)(address) & value;//got a bad feeling it's going to go logical :(
case 3://NAND
if(mem&&value)
*(ui32*)(address) = (~*(ui32*)(address) & ~value);
return 0x00000000;
return (~*(ui32*)(address) & ~value);
case 4://NOR
if(mem&&value)
*(ui32*)(address) = (~*(ui32*)(address) | ~value);
return 0x00000000;
return ~(*(ui32*)(address) | value);
case 5://NOT
if(mem&&value)
*(ui32*)(address) = ~value;
return 0x00000000;
if(mem)
*(ui32*)(address) = ~*(ui32*)(address);
return 0x00000000;
return ~*(ui32*)(address);
case 6://SHIFT_LEFT
//Use value argument as amount of bits
if(mem&&value>=31)
*(ui32*)(address) <<= ((!value ? 24 : value)&0xFFFFFF);
return 0x00000000;
return (!(*(ui32*)(address) << (!value ? 24 : value)) ? 0 : *(ui32*)(address) << value);
case 7://SHIFT_RIGHT
if(mem&&value>=31)
*(ui32*)(address) >>= ((!value ? 24 : value)&0xFFFFFF);
return 0x00000000;
return (!(*(ui32*)(address) >> (!value ? 24 : value)) ? 0 : *(ui32*)(address) >> value);
}
}
//signed
i32 Add(i32 address, mem_s mem, i32 value = 0x00000000)
{
if(mem&&value)
*(i32*)(address) += value;
return 00;
return *(i32*)(address) + value;
}
i32 Sub(i32 address, mem_s mem, i32 value = 0x00000000)
{
if(value > *(i32*)(address)) printf("Basic Math error\n\targument value [%08X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(i32*)(address) -= value;
return 00;
return *(i32*)(address) - value;
}
i32 Mul(i32 address, mem_s mem, i32 value = 0x00000000)
{
if(mem&&value)
*(i32*)(address) *= value;
return 0;
return *(i32*)(address) * value;
}
i32 Div(i32 address, mem_s mem, i32 value = 0x00000000)
{
if(value > *(i32*)(address)) printf("Basic Math error\n\targument value [%08X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(i32*)(address) /= value;
return 0;
return *(i32*)(address) / value;
}
i32 R(i32 address, i32 len) //Get Remander
{
return *(i32*)(address) % len;
}
i32 Bitwise(i32 address, bit bitop, mem_s mem, i32 value=0x00000000)//Bitwise(0x00001234, Data::bit::XOR, mem_s::MEM_WRITE, 0x1234);
{
switch(bitop)
{
case 0://OR
if(mem&&value)
*(i32*)(address) |= value;
return 0x00000000;
return *(i32*)(address) | value;
case 1://XOR
if(mem&&value)
*(i32*)(address) ^= value;
return 0x00000000;
return *(i32*)(address) ^ value;
case 2://AND
if(mem&&value)
*(i32*)(address) &= value;
return 0x00000000;
return *(i32*)(address) & value;//got a bad feeling it's going to go logical :(
case 3://NAND
if(mem&&value)
*(i32*)(address) = (~*(i32*)(address) & ~value);
return 0x00000000;
return (~*(i32*)(address) & ~value);
case 4://NOR
if(mem&&value)
*(i32*)(address) = (~*(i32*)(address) | ~value);
return 0x00000000;
return ~(*(i32*)(address) | value);
case 5://NOT
if(mem&&value)
*(i32*)(address) = ~value;
return 0x00000000;
if(mem)
*(i32*)(address) = ~*(i32*)(address);
return 0x00000000;
return ~*(i32*)(address);
case 6://SHIFT_LEFT
//Use value argument as amount of bits
if(mem&&value>=31)
*(i32*)(address) <<= ((!value ? 24 : value)&0xFFFFFF);
return 0x00000000;
return (!(*(i32*)(address) << (!value ? 24 : value)) ? 0 : *(i32*)(address) << value);
case 7://SHIFT_RIGHT
if(mem&&value>=31)
*(i32*)(address) >>= ((!value ? 24 : value)&0xFFFFFF);
return 0x00000000;
return (!(*(i32*)(address) >> (!value ? 24 : value)) ? 0 : *(i32*)(address) >> value);
}
}
#pragma endregion
#pragma region Math ~ Int64
//unsigned
ui64 Add(i32 address, mem_s mem, ui64 value = 0x0000000000000000)
{
if(mem&&value)
*(ui64*)(address) += value;
return 00;
return *(ui64*)(address) + value;
}
ui64 Sub(i32 address, mem_s mem, ui64 value = 0x0000000000000000)
{
if(value > *(ui64*)(address)) printf("Basic Math error\n\targument value [%016X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(ui64*)(address) -= value;
return 00;
return *(ui64*)(address) - value;
}
ui64 Mul(i32 address, mem_s mem, ui64 value = 0x0000000000000000)
{
if(mem&&value)
*(ui64*)(address) *= value;
return 0;
return *(ui64*)(address) * value;
}
ui64 Div(i32 address, mem_s mem, ui64 value = 0x0000000000000000)
{
if(value > *(ui64*)(address)) printf("Basic Math error\n\targument value [%016X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(ui64*)(address) /= value;
return 0;
return *(ui64*)(address) / value;
}
ui64 R(i32 address, ui64 len) //Get Remander
{
return *(ui64*)(address) % len;
}
ui64 Bitwise(i32 address, bit bitop, mem_s mem, ui64 value=0x0000000000000000)//Bitwise(0x00001234, Data::bit::XOR, mem_s::MEM_WRITE, 0x1234);
{
switch(bitop)
{
case 0://OR
if(mem&&value)
*(ui64*)(address) |= value;
return 0x0000000000000000;
return *(ui64*)(address) | value;
case 1://XOR
if(mem&&value)
*(ui64*)(address) ^= value;
return 0x0000000000000000;
return *(ui64*)(address) ^ value;
case 2://AND
if(mem&&value)
*(ui64*)(address) &= value;
return 0x0000000000000000;
return *(ui64*)(address) & value;//got a bad feeling it's going to go logical :(
case 3://NAND
if(mem&&value)
*(ui64*)(address) = (~*(ui64*)(address) & ~value);
return 0x0000000000000000;
return (~*(ui64*)(address) & ~value);
case 4://NOR
if(mem&&value)
*(ui64*)(address) = (~*(ui64*)(address) | ~value);
return 0x0000000000000000;
return ~(*(ui64*)(address) | value);
case 5://NOT
if(mem&&value)
*(ui64*)(address) = ~value;
return 0x0000000000000000;
if(mem)
*(ui64*)(address) = ~*(ui64*)(address);
return 0x0000000000000000;
return ~*(ui64*)(address);
case 6://SHIFT_LEFT
//Use value argument as amount of bits
if(mem&&value>=31)
*(ui64*)(address) <<= ((!value ? 52 : value)&0xFFFFFFFFFFFFFF);
return 0x0000000000000000;
return (!(*(ui64*)(address) << (!value ? 52 : value)) ? 0 : *(ui64*)(address) << value);
case 7://SHIFT_RIGHT
if(mem&&value>=31)
*(ui64*)(address) >>= ((!value ? 52 : value)&0xFFFFFFFFFFFFFF);
return 0x0000000000000000;
return (!(*(ui64*)(address) >> (!value ? 52 : value)) ? 0 : *(ui64*)(address) >> value);
}
}
//signed
i64 Add(i32 address, mem_s mem, i64 value = 0x00000000)
{
if(mem&&value)
*(i64*)(address) += value;
return 00;
return *(i64*)(address) + value;
}
i64 Sub(i32 address, mem_s mem, i64 value = 0x00000000)
{
if(value > *(i64*)(address)) printf("Basic Math error\n\targument value [%016X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(i64*)(address) -= value;
return 00;
return *(i64*)(address) - value;
}
i64 Mul(i32 address, mem_s mem, i64 value = 0x00000000)
{
if(mem&&value)
*(i64*)(address) *= value;
return 0;
return *(i64*)(address) * value;
}
i64 Div(i32 address, mem_s mem, i64 value = 0x00000000)
{
if(value > *(i64*)(address)) printf("Basic Math error\n\targument value [%016X] must be less than the value inside address [%08X]\n", value, address); return 0;
if(mem&&value)
*(i64*)(address) /= value;
return 0;
return *(i64*)(address) / value;
}
i64 R(i32 address, i64 len) //Get Remander
{
return *(i64*)(address) % len;
}
i64 Bitwise(i32 address, bit bitop, mem_s mem, i64 value=0x0000000000000000)//Bitwise(0x00001234, Data::bit::XOR, mem_s::MEM_WRITE, 0x1234);
{
switch(bitop)
{
case 0://OR
if(mem&&value)
*(i64*)(address) |= value;
return 0x0000000000000000;
return *(i64*)(address) | value;
case 1://XOR
if(mem&&value)
*(i64*)(address) ^= value;
return 0x0000000000000000;
return *(i64*)(address) ^ value;
case 2://AND
if(mem&&value)
*(i64*)(address) &= value;
return 0x0000000000000000;
return *(i64*)(address) & value;//got a bad feeling it's going to go logical :(
case 3://NAND
if(mem&&value)
*(i64*)(address) = (~*(i64*)(address) & ~value);
return 0x0000000000000000;
return (~*(i64*)(address) & ~value);
case 4://NOR
if(mem&&value)
*(i64*)(address) = (~*(i64*)(address) | ~value);
return 0x0000000000000000;
return ~(*(i64*)(address) | value);
case 5://NOT
if(mem&&value)
*(i64*)(address) = ~value;
return 0x0000000000000000;
if(mem)
*(i64*)(address) = ~*(i64*)(address);
return 0x0000000000000000;
return ~*(i64*)(address);
case 6://SHIFT_LEFT
//Use value argument as amount of bits
if(mem&&value>=31)
*(i64*)(address) <<= ((!value ? 52 : value)&0xFFFFFFFFFFFFFF);
return 0x0000000000000000;
return (!(*(i64*)(address) << (!value ? 52 : value)) ? 0 : *(i64*)(address) << value);
case 7://SHIFT_RIGHT
if(mem&&value>=31)
*(i64*)(address) >>= ((!value ? 52 : value)&0xFFFFFFFFFFFFFF);
return 0x0000000000000000;
return (!(*(i64*)(address) >> (!value ? 52 : value)) ? 0 : *(i64*)(address) >> value);
}
}
#pragma endregion
};
07-28-2014, 08:02 PM #12
xPAQz
Bounty hunter
Originally posted by milky4444 View Post

    
quartal-deutscher swag


lol quartal-deutscher swag xD
07-31-2014, 01:36 PM #13
xballox
Pokemon Trainer
if I try to insert this function:
    
int32_t write_process(uint64_t ea, const void * data, uint32_t size)
{
// 905 = sys_call number
//sys_process_getpid() = pid
// ea = offset
// size = lenght of the bytes
//data = bytes
system_call_4(905, (uint64_t)sys_process_getpid(), ea, size, (uint64_t)data);
return_to_user_prog(int32_t);
}


got an error: "error: identifier sys_process_getpid is undefined

If i try *(int*)0xEF68C = 0x2C030001; the ps3 freeze... Reaper

How I can set the memory?... @EnVatoHD
Last edited by xballox ; 07-31-2014 at 01:40 PM.
10-30-2014, 02:17 PM #14
Jannik007
Do a barrel roll!
Originally posted by xballox View Post
if I try to insert this function:
    
int32_t write_process(uint64_t ea, const void * data, uint32_t size)
{
// 905 = sys_call number
//sys_process_getpid() = pid
// ea = offset
// size = lenght of the bytes
//data = bytes
system_call_4(905, (uint64_t)sys_process_getpid(), ea, size, (uint64_t)data);
return_to_user_prog(int32_t);
}


got an error: "error: identifier sys_process_getpid is undefined

If i try *(int*)0xEF68C = 0x2C030001; the ps3 freeze... Reaper

How I can set the memory?... @EnVatoHD


You have add this include to your header file:

#include <sys/process.h>

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo