GreenHouse wrote: ↑Sat Jun 11, 2022 6:57 pm
r0b33 wrote: ↑Sat Jun 11, 2022 6:36 pm
Could you please create an x86 version? (or just the enabler, unlocker, and all message functions?
)
Well, that's tough, x86 calling conventions are different, and it does need lots of changes. Including the registers.
You'd need to change all registers to x86 rax->eax, change the pushes on top for pushad and then the pops for popad, then instead of setting the params of each call on registers, you'd need to push them in reverse, and then probably align the stack. It's quite a bit of work.
x86 calling conventions are just a bit annoying to work with.
if I understand correctly, this is a nicely worded negative answer.
I'm trying, though... What i did:
Code: Select all
[ENABLE]
{$lua}
if syntaxcheck then return end
if process and readInteger(process) ~= 0 then LaunchMonoDataCollector()
else local msg = 'No process detected.' print(msg) error(msg) end
----
local s = findTableFile('GreenMono.lua').Stream
local f = loadstring(readStringLocal(s.Memory,s.Size))
f()
----
deleteStructures()
AOStruct('','GameContentData')
AOStruct('','Girl')
AOStruct('','GDEGirlData')
AOStruct('','GDELocationData')
AOStruct('','DailyChallengeCheckPoint')
EnumClassesAll()
GDMethod('', 'Player', nil, 'UnlockSticker', 'GameDataEditor.GDEStickerData,bool', true, false)
GDMethod('', 'Player', nil, 'UnlockInteractiveScene', 'GameDataEditor.GDEInteractiveSceneData,bool', true, false)
removed ['Assembly-CSharp',] ======> SetTrampoline('Girl:CanTalk','GirlCanTalkTrampoline')
removed ['Assembly-CSharp',] ======> SetTrampoline('GameContentData:Init','GCDInitTrampoline')
{$asm}
alloc(fCanTalk,$1000)
alloc(fGCDInit,2048)
registersymbol(fCanTalk)
registersymbol(fGCDInit)
label(fCanTalkRet)
label(fGCDInitRet)
alloc(currentGirl,8)
alloc(GCD,8)
registersymbol(currentGirl)
registersymbol(GCD)
fCanTalk:
modified 8 to 7 because jmp+address need 5 byte and there was 7 byte long instruction(s) ======> readmem(Girl:CanTalk,7)
modified rax to eax ======> mov eax,currentGirl
modified rax to eax and rcx to ecx ======> mov [eax],ecx
jmp fCanTalkRet
fGCDInit:
readmem(GameContentData:Init,9)
modified r11 to edi ======> mov edi,GCD
modified r11 to edi and rcx to ecx ======> mov [edi],ecx
jmp fGCDInitRet
Girl:CanTalk:
jmp GirlCanTalkTrampoline
nop 2 changed because that's all the substitution needed, and because I noticed that the nop 2 code was displaying incorrectly in the assembly. ======> nop
nop
fCanTalkRet:
GameContentData:Init:
jmp GCDInitTrampoline
same reason as above ======> nop
nop
nop
nop
fGCDInitRet:
GirlCanTalkTrampoline:
jmp fCanTalk
GCDInitTrampoline:
jmp fGCDInit
[DISABLE]
Girl:CanTalk:
readmem(fCanTalk,7)
GameContentData:Init:
readmem(fGCDInit,9)
dealloc(*)
unregistersymbol(*)
ok, at this point I can activate the ENABLE option. However, the unlock option throws an error to the lua script
Code: Select all
{$lua}
if syntaxcheck then return end
if readIntegerLocal('[GameDataLists:get_Content+6]') == 0 then
error(ShowMessage([["GameContentData" not found.
Make sure that the game is loaded.]])) end
if readIntegerLocal('GCD') == 0 and readIntegerLocal('[GameDataLists:get_Content+6]') ~= 0 then --Didn't enable Pre-Init, so get it from another place
writeIntegerLocal('GCD',readIntegerLocal('[GameDataLists:get_Content+6]'))
end
Array2DropDown('Girl', readIntegerLocal('[GCD]+' .. LUAGetStructOffset('OffsetsGameContentData', 'girlData', true)),'[[tempAddr]+10]+14',0x20, 0x08)
Array2DropDown('Sticker', readIntegerLocal('[GCD]+' .. LUAGetStructOffset('OffsetsGameContentData', 'stickerData', true)),'[[tempAddr]+10]+14',0x20, 0x08)
Array2DropDown('Interactive Scene', readIntegerLocal('[GCD]+' .. LUAGetStructOffset('OffsetsGameContentData', 'interactiveSceneData', true)),'[[tempAddr]+10]+14',0x20, 0x08)
Array2DropDown('Girl Variation', readIntegerLocal('[GCD]+' .. LUAGetStructOffset('OffsetsGameContentData', 'girlVariationData', true)),'[[tempAddr]+10]+14',0x20, 0x08,'GIRLVARIATION')
Array2DropDown('Item', readIntegerLocal('[GCD]+' .. LUAGetStructOffset('OffsetsGameContentData', 'itemData', true)),'[[tempAddr]+10]+14',0x20, 0x08)
Array2DropDown('Fact', readIntegerLocal('[GCD]+' .. LUAGetStructOffset('OffsetsGameContentData', 'factData', true)),'[[tempAddr]+10]+14',0x20, 0x08)
attempt to perform arithmetic on a nil value
(no matter whether readIntegerLocal or readQword)
All further commands are commented out at this point.