-
Notifications
You must be signed in to change notification settings - Fork 3
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
something for me or someone else to do if they have time #7
Comments
|
|
|
From your comments: Line 32 in 84c4c6b
I had a user try this earlier today and report that swapping the files didn't work.
|
My comments sometimes make little sense.. What the comment is supposed to mean is that instead of replacing the CMOVNZ instruction to a CMOVZ instruction I just replace the conditional move with a normal move operation. Doing this (and I think a little more) avoids the isVanilla mess and you can ask the user what achievement file should be active. Line 84 in 84c4c6b
Line 145 in 84c4c6b
Reading the issue in your repo, I'm a little concerned about the is-modded flag in the achievements-modded file. But I'm pretty sure the other patterns are patching that issue. I need to check that when I'm home so I might be wrong .-. You can find the pattern for the CMOVNZ thingy by looking at the reference in PlayerData::PlayerData for achievements-modded.dat or achievements.dat and then searching in the assembly view for the CMOVNZ instruction below the reference. It should be pretty close. At least that's how it is in the linux binary, depending on the compiler and the optimization the code in the windows version the decompiled assembly can wildly differ like it already does in other places where entire functions get optimized out. |
IDA decompile: https://gist.github.com/oorzkws/30c4ba450df2c36fbe5c4950c3dcc8fa#file-playerdata-c-L284 I'm guessing the CMOVNZ referenced is the case at L284: lea this, aAchievementsDa ; "achievements.dat"
lea rdx, aAchievementsMo ; "achievements-modded.dat"
test al, al
cmovnz rdx, this ; _Ptr
mov [rbx], r14
mov [rbx+10h], r14
mov qword ptr [rbx+18h], 0Fh
mov byte ptr [rbx], 0
mov rsi, 0FFFFFFFFFFFFFFFFh
mov r8, rsi
nop dword ptr [rax+rax+00h] In the Windows version, the loop at L273 (leaving |
yeah looks good. v13 = "achievements-modded.dat";
->>> if ( v12 ) <<<-
v13 = "achievements.dat"; the goal is to patch that to the following: v13 = "achievements.dat"; or (what I'm currently doing) v13 = "achievements-modded.dat";
if ( !v12 )
v13 = "achievements.dat"; -> hf playing without mods with that one tho As to what other places you have to patch, I have no idea. You can use mine as a reference. The linux binary decompiles pretty quickly (compared to the windows binary). I currently have little time to help since I'm in the process of moving to a different place. If you need the binary for linux you can either follow the steps here and replacing the items that reference windows with linux or hmu on discord. I have double checked if my optional patch works and can confirm that it works. |
@UnlegitSenpaii so what about the Windows version? |
No time |
The text was updated successfully, but these errors were encountered: