Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show jump offsets and object keys & values in disassembly #14

Open
vs49688 opened this issue Feb 18, 2022 · 1 comment
Open

Show jump offsets and object keys & values in disassembly #14

vs49688 opened this issue Feb 18, 2022 · 1 comment

Comments

@vs49688
Copy link

vs49688 commented Feb 18, 2022

As it stands, it's difficult to (a) determine the object keys/values used in New*WithBuffer instructions, and (b) determine the exact location of a jump.

It would be great if this information could be displayed in the disassembly output (see below for examples).

I've done a proof-of-concept here, but it's very dodgy.

Function offsets:

0000: Function<Ie>9746(3 params, 16 registers, 2 symbols):
0000: 	CreateEnvironment   	Reg8:0
0002: 	LoadParam           	Reg8:3, UInt8:1
0005: 	LoadConstUInt8      	Reg8:7, UInt8:1
0008: 	LoadConstUndefined  	Reg8:6
0010: 	LoadConstUndefined  	Reg8:4
0012: 	GetArgumentsLength  	Reg8:5, Reg8:4
0015: 	LoadConstUInt8      	Reg8:2, UInt8:2
0018: 	Mov                 	Reg8:1, Reg8:7
0021: 	JNotGreater         	Addr8:19, Reg8:5, Reg8:2
0021:	; Oper[1]; Offset(40)

0025: 	GetArgumentsPropByVal	Reg8:5, Reg8:2, Reg8:4
0029: 	Mov                 	Reg8:1, Reg8:7
0032: 	JStrictEqual        	Addr8:8, Reg8:6, Reg8:5
0032:	; Oper[1]; Offset(40)

0036: 	GetArgumentsPropByVal	Reg8:1, Reg8:2, Reg8:4
0040: 	LoadParam           	Reg8:2, UInt8:2
0043: 	StoreToEnvironment  	Reg8:0, UInt8:1, Reg8:2
...

Object keys & values:

...
0085: 	Call4               	Reg8:9, Reg8:14, Reg8:15, Reg8:5, Reg8:9, Reg8:13
0092: 	NewObjectWithBuffer 	Reg8:9, UInt16:11, UInt16:11, UInt16:33863, UInt16:288
0092:	; Oper[3]: ObjectKey(33863, String(12426)) 'updateId'
0092:	; Oper[3]: ObjectKey(33863, String(25017)) 'releaseChannel'
0092:	; Oper[4]: ObjectVal(288, Boolean(True))
0092:	; Oper[4]: ObjectVal(288, Boolean(True))
...
@bongtrop
Copy link
Owner

Ho nice idea! Could you please create the merge request?

@bongtrop bongtrop reopened this Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants