The methods already exist in PS3API so....
private static PS3API PS3 = new PS3API(); // create an instance of PS3Lib v4.2 by iMCSx
PS3.SetMemory(uint offset, byte[] buffer); // make the call to write
PS3.GetMemory(uint offset, byte[] buffer); // call to read, buffer is sent by reference