Skip to content

Commit 9f9d43a

Browse files
committed
RSZ (Wilds): Hardcode JointExprGraphLayer layout
1 parent ba84de1 commit 9f9d43a

File tree

1 file changed

+54
-1
lines changed

1 file changed

+54
-1
lines changed

reversing/rsz/emulation-dumper.py

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,54 @@
2323

2424
zero_member_functions = {}
2525

26+
hardcoded_jointexprgraphlayer = [
27+
{
28+
"align": 4,
29+
"element": None,
30+
"element_size": 36,
31+
"list": False,
32+
"offset": 6097817636,
33+
"size": 4,
34+
"string": True
35+
},
36+
{
37+
"align": 1,
38+
"element": None,
39+
"element_size": 1,
40+
"list": False,
41+
"offset": 6097817637,
42+
"size": 1,
43+
"string": False
44+
},
45+
{
46+
"align": 4,
47+
"element": None,
48+
"element_size": 4,
49+
"list": False,
50+
"offset": 6097817644,
51+
"size": 4,
52+
"string": False
53+
},
54+
{
55+
"align": 1,
56+
"element": None,
57+
"element_size": 1,
58+
"list": False,
59+
"offset": 6097817645,
60+
"size": 1,
61+
"string": False
62+
},
63+
{
64+
"align": 4,
65+
"element": None,
66+
"element_size": 4,
67+
"list": False,
68+
"offset": 6097817652,
69+
"size": 4,
70+
"string": False
71+
}
72+
]
73+
2674
# these are chains we'll use for testing on games we are encountering issues with
2775
# so we don't need to parse the entire JSON dump
2876
default_chains = {
@@ -1180,6 +1228,11 @@ def detect_members_chain(struct_name, chain):
11801228
"layout": detect_members(addr, prev_entries)
11811229
})
11821230

1231+
# This is because for some reason in Wilds this deserializer is obfuscated to hell and the emulator can't handle it
1232+
if entry["name"] == "via.motion.JointExprGraphLayer" and len(layout_list[-1]["layout"]) == 0:
1233+
layout_list[-1]["layout"] = hardcoded_jointexprgraphlayer
1234+
print("Hardcoded layout for via.motion.JointExprGraphLayer")
1235+
11831236
prev_entries[addr] = True
11841237
meta_frame["prev_layout"] = layout_list[-1]["layout"]
11851238

@@ -1252,7 +1305,7 @@ def generate_typename(layout):
12521305
break
12531306

12541307
print(ins)
1255-
os.system("pause")
1308+
# os.system("pause")
12561309

12571310
count = count + 1
12581311
sys.stdout.write("\r%f%%" % (float(count / chains_len) * 100.0))

0 commit comments

Comments
 (0)