Post: {Read/INFO!] Understanding Hex Values and find the Bytes and much more:
02-02-2015, 08:05 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hey NGU, today i here to talk about finding bytes / other off things:

Note: For beginners:

i have seen alot of people making post on how to find offset but not the bytes:
and alot of tool that people are selling :Facepalm: really !! even if you have the offets that doesn't mean you have something speacal:

if you had offhost god mod or something like OSM menu or that no one has seen then sell it if you want but selling some thing that anyone with no knowledge can find well that is just non sense:


Def:
Boolean: this is simply just true or false:
Dword: this mean double(2):
Qword: this is means quad(4):
NOP: this is short for No Operation:
bytes:
Eboot/other
How use dvars:
Null:



1) Boolean:
Say you have the 106 AW laser offset ( 202FB3 ) when we jump to this offset wee see it has the value of 01 so this in most cases is a boolean so to turn it on would be 00 because false is 01.

2)Dword:
This is is 2 bytes, in some cases when you go to an offset you only need to change 2 of them to enable it:

3)Qword:
This is 4 bytes, in some cases we will have to change the 4 of the bytes to enable it:

4)NOP:
Some of the address need to be nop so that they won't run in the game (AW106 recoil is one of those offsets: ) to nop a cod offset just change 4 bytes to 60 00 00 00:

5)Bytes:
1 bytes = two character; so say (4234 fake offset) is uav for a sec and the on bytes were 1 what that means it's 01 or 10

6)EBOOT/Other:
This is just to explain the difference in an eboot offset/offset:
when you modify an eboot.elf you have to find the offset and subtract it by ten thousand; some offsets don't fit in an eboot but can still be used through an rtm tools or put them eboot with ppc:

7)cbuf_addtext:
this allow the use of dvars to be used off host:
like third person, g_compassshowenimes 1, wall hack and much more:

Cool Man (aka Tustin)null:
this just means that it has no value and is set to zero:

AS I SAID ON THE TOP THIS IS FOR BEGINNERS SO I TRIED MY BEST TO MAKE THIS POST WITH LESS COMPLEX
EXAMPLES: PEOPLE THAT WILL GROAN THIS WILL BE THOSE WHO CAN'T READ OR ONES THAT ARE SELLING TOOL THAT HAS USELESS OFFSET THAT ANYONE CAN GET: THIS IS A COMMUNITY AND WILL ONLY GROW IF PEOPLE HELP CONTRIBUTE TO KNEW LEARNERS SO GROAN AS MUCH AS NEED BUT WHEN YOU DO REMEMBER THAT GROANING DOESN'T HELP WHEN USE FOR SELFISH REASONS. HAVE A WONDERFUL DAY Smile
i hope this helps:
Josh/Hacking247
Last edited by hacking247 ; 02-02-2015 at 10:06 AM.

The following 6 users say thank you to hacking247 for this useful post:

AustinMods-, Boliberrys, Egoford, HiddenHour, TheNewZeOn, tyronS

The following 3 users groaned at hacking247 for this awful post:

Bad Luck Brian, John, SONYS✮NIGHTMARE
02-02-2015, 09:36 AM #2
thank you very nice
02-02-2015, 07:41 PM #3
Egoford
Little One
I still dont understand. What does "Boolean" and the other words mean ? And in which case do I have to use them ?

Anyways... Thank you.
02-05-2015, 10:01 AM #4
OPCode
Banned
This is so wrong. DWORD means double word, the size of a word is 2 bytes...a dword is 4 bytes, a qword is 8 bytes. NOOP is in every assembly architecture, but the OPCode in PowerPC is 0x60000000. I explained most of this in a PM on se7ensins...

Originally posted by OPCode

ASM = Assembly.
Every single machine runs on a processor, and every processor has an assembly archiecture. Xbox 360's Assembly Archiecture is PowerPC, so ALL files that are ran, or just loaded into memory can ONLY be disassembled with PowerPC. So, lets for example take what Bitwise released.

[code=cpp]
*(long long*)(0x822EA24Cool Man (aka Tustin) = 0x8921005060000000;
[/code]

[spoiler=Something quick]
I'm going to make this noob proof. Basically, in hexadecimal (012345679ABCDEF) 2 digits is 1 byte. (e.g. 01, 05, 15).

    

Data type Data Format Size (Bytes)
char byte 1
bool byte 1
short word 2
int double word 4
long double word 4
float single precision 4
double double precision 8
long long quadruple word 8



Note also, a pointer (*) is aligned by 4 bytes (So, if you was to do sizeof(bool*) it would return 4). Also note, multiply the byte sie by 8, to get the bit size (e.g. 4*8 = 32)

Now, take the value we set to that address, and seperate the bytes (So it's easier to count how many are there)

    
89 21 00 50 60 00 00 00
1 2 3 4 5 6 7 8


As you can see, there are 8 bytes. The value is also an interger (intergers are fixed numbers (e.g. can not be set to 1.3)) so the only logical data type to cast with, is long long.

So now you understand data types why when/why to use them. Lets see why that value.

Every assembly language has an instruction set. They are compiled from opcode. In PowerPC, all instruction's are 32bit, so the opcode is going to be 32bit.

OPCode works strange at first, but you get used to it. If an instruction has no operands, the whole 32bit value is registered as opcode. NOOP for example, stands for no operation, which means to do nothing. In all ASM archiectures, the NOOP instruction is just;
    
nop


In PowerPC, the opcode for NOOP is 0x60000000.

OPCode works differently depending on how the instruction works, and the data used.

Instruction's such as li (Load Immediate (immediate is a 16bit integer)), lwz (Load Word with Zero (In PowerPC, a Word is 32bits not 16bits)) stw (Store Word) and so forth regarding data formats, work in a very simple manner.

As I said, all instructions are 32bits, which is only 4 bytes.
    
0-8 = OPCODE
8-16 = 1st OPERAND
16-32 = 2nd OPERAND


For example, li r3, 0 is;
38 60 00 00

And li r4, 1 is;
38 80 00 01

See how the second byte increased by 0x20? Each increment within the register number, will increase the value by 0x20.

r0 = 0x00
r1 = 0x20
r2 = 0x40
r3 = 0x60
r4 = 0x80
r5 = 0xA0
r6 = 0xC0
r7 = 0xE0

When we get to R8, the OPCode gets increased by 1 (The first byte), and the 2nd byte resets.

So li r8, 0 is
39 00 00 00

r8 = 0x00
r9 = 0x20
r10 = 0x40
r11 = 0x60
r12 = 0x80
r13 = 0xA0
r14 = 0xC0
r15 = 0xE0

Nothing higher can be used. The opcode can only range from 0x38 to 0x39. 0x40 is getting into branching.

Now, here is what a load instruction looks like (The memory instruction, does not include li, lis ect)

    
lbz <myDestionation>, <myOffset>(<myPointer>Winky Winky


lbz = Load Byte with Zero.
myOffset is an immediate, which as I said before is a short. In C++ this is;

[code=cpp]
unsigned char myDestionation = *(unsigned char*)(myPointer + myOffset);
[/code]


lbz's opcode starts at 0x88, and ends at 0x89. Regarding the second byte, r0 is now the pointing register number (e.g. r1 used, r0 = 0x01) I'm going to use X in the list, as a place holder.

r0 = 0x0X
r1 = 0x2X
r2 = 0x4X
r3 = 0x6X
r4 = 0x8X
r5 = 0xAX
r6 = 0xCX
r7 = 0xEX

INCREASE (OPCODE is now 0x89)

r8 = 0x0X
r9 = 0x2X
r10 = 0x2X
r11 = 0x6X
r12 = 0x8X
r13 = 0xAX
r14 = 0xCX
r15 = 0xEX

Now, remember the value we were using.
    
89 21 00 50 60 00 00 00
1 2 3 4 5 6 7 8


0x89210050...
0x89 = lbz 2nd register set opcode
0x21 = r1 OR r9 (depending on the set of registers used (r0-r7 or r8-r15)
0x0050 = offset

So as an instruction, this will look like

    
lbz r9, 0x50(r1)


If you have forgot how we add that up, re-read it.

as I said before, NOOP is 0x60000000

SO

0x8921005060000000

is....
    
lbz r9, 0x50(r1)
nop

[/spoiler]

How that you have read the logic behind Bitwise's bypass, I will now tell you how it works.

Located at 0x822EA248, is the instruction;
    
lbz r10, 0x50(r1)


I'm not going to go into detail since r1 is the stack pointer, and it means I will have to explain stack. All you need to know, is located at 0x50 in the stack frame inside this function, is a local variable. The reason he use's long long, is since it is 8 bytes. So since instructions are 4 bytes, writing with a value of 8 bytes and a 8 byte data type, will overwrite into the next instruction. So, doing
[code=cpp]
*(long long*)(0x822EA24Cool Man (aka Tustin) = 0x8921005060000000;
[/code]
is the same as doing
[code=cpp]
*(int*)(0x822EA24Cool Man (aka Tustin) = 0x89210050;
*(int*)(0x822EA24C) = 0x60000000;
[/code]

Originally, it would be

    
lbz r10, 0x50(r1)
ori r9, r10, 0x10
stb r9, 0x50(r1)


And he is altering it, to

    
lbz r9, 0x50(r1)
nop
stb r9, 0x50(r1)


Which as you see, this will not preform the ORI instruction (Which OR's 0x10 to the local variable). This is done when xbdm.xex is found active in memory (So in noob terms, if you have xbdm.xex as a plugin in dashlaunch it will be detected)

So this will stop the system from detecting you're on a modified console (Since only modified console's can load third party title images into memory) and flag you for a console ban.

EDIT:

Jesus christ, I just noticed that I spent an hour writing this XD so if you don't mind, I would be pleased and happy if you saved this PM in a text file or something, for future preferences.


Ignore half of it, it was regarding something else...
02-10-2015, 09:59 AM #5
Ephdel
Keeper
...........
Last edited by Ephdel ; 11-26-2016 at 05:24 PM.
02-10-2015, 05:38 PM #6
How do they find the laser offset in the first place
02-11-2015, 10:20 PM #7
RatchetBooty
Former Staff
Originally posted by Egoford View Post
I still dont understand. What does "Boolean" and the other words mean ? And in which case do I have to use them ?

Anyways... Thank you.


Boolean or bool for short is a binary variable .-. It has 2 values, true or false.

The following user thanked RatchetBooty for this useful post:

Egoford

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo