GoG version: Potentially useful addresses. AOB scans will be harder due to duplicate code in multiple places.
This gets triggered when spending attributes both on initial screen and later for perks and attributes. So just "Findout what addresses are written to" makes it easy especially early when you have only 1 perk or attribute to spend.
The real hard part is finding the code is only used by the player in specific case but that is not the case here. So these addresses aren't really useful for creating a table but could be for one-off hacking which is what I'm using it for.
Cyberpunk2077.exe+23C02C
AOB: 89 03 48 85 F6 74 02 89 06 48 8B 5C 24 40 48 8B 6C 24 58 48 83 C4 20 (not unique)
Cyberpunk2077.exe+23C023: 48 FF 07 - inc [rdi]
Cyberpunk2077.exe+23C026: 8B 03 - mov eax,[rbx]
Cyberpunk2077.exe+23C028: 2B 44 24 50 - sub eax,[rsp+50]
// ---------- INJECTING HERE ----------
Cyberpunk2077.exe+23C02C: 89 03 - mov [rbx],eax
// ---------- DONE INJECTING ----------
Cyberpunk2077.exe+23C02E: 48 85 F6 - test rsi,rsi
Cyberpunk2077.exe+23C031: 74 02 - je Cyberpunk2077.exe+23C035
Cyberpunk2077.exe+23C033: 89 06 - mov [rsi],eax
Cyberpunk2077.exe+23C035: 48 8B 5C 24 40 - mov rbx,[rsp+40]
Cyberpunk2077.exe+23C03A: 48 8B 6C 24 58 - mov rbp,[rsp+58]
Cyberpunk2077.exe+23C03F: 48 83 C4 20 - add rsp,20
Cyberpunk2077.exe+25F577
aobscanmodule(INJECT,Cyberpunk2077.exe,03 C8 66 0F 6E C9 0F 5B C9 F3 0F 2C C1 89 07 48 8B 5C 24 30) // should be unique
Cyberpunk2077.exe+25F56A: 03 C8 - add ecx,eax
Cyberpunk2077.exe+25F56C: 66 0F 6E C9 - movd xmm1,ecx
Cyberpunk2077.exe+25F570: 0F 5B C9 - cvtdq2ps xmm1,xmm1
Cyberpunk2077.exe+25F573: F3 0F 2C C1 - cvttss2si eax,xmm1
// ---------- INJECTING HERE ----------
Cyberpunk2077.exe+25F577: 89 07 - mov [rdi],eax
// ---------- DONE INJECTING ----------
Cyberpunk2077.exe+25F579: 48 8B 5C 24 30 - mov rbx,[rsp+30]
Cyberpunk2077.exe+25F57E: 48 83 C4 20 - add rsp,20
Cyberpunk2077.exe+25F582: 5F - pop rdi
Cyberpunk2077.exe+25F583: C3 - ret
Cyberpunk2077.exe+1A7E637
aobscanmodule(INJECT,Cyberpunk2077.exe,CC 89 A6 40 03 00 00) // should be unique
Cyberpunk2077.exe+1A7E628: 48 8B 8E 98 03 00 00 - mov rcx,[rsi+00000398]
Cyberpunk2077.exe+1A7E62F: 41 8B D4 - mov edx,r12d
Cyberpunk2077.exe+1A7E632: E8 49 39 FE FF - call Cyberpunk2077.exe+1A61F80
// ---------- INJECTING HERE ----------
Cyberpunk2077.exe+1A7E637: 44 89 A6 40 03 00 00 - mov [rsi+00000340],r12d
// ---------- DONE INJECTING ----------
Cyberpunk2077.exe+1A7E63E: 38 9E 12 03 00 00 - cmp [rsi+00000312],bl
Cyberpunk2077.exe+1A7E644: 74 33 - je Cyberpunk2077.exe+1A7E679
Cyberpunk2077.exe+1A7E646: 48 8B 4C 24 30 - mov rcx,[rsp+30]
Cyberpunk2077.exe+1A7E64B: 48 85 C9 - test rcx,rcx
Edit:
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>1</ID>
<Description>"Crafting does not consume components"</Description>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>
[ENABLE]
aobscanmodule(UpdateCraftItems,Cyberpunk2077.exe,89 57 78 48 83 C4 20) // should be unique
alloc(newmem,$1000,UpdateCraftItems)
label(code)
label(return)
newmem:
code:
@@:
cmp edx,[rdi+78]
jle @f
mov [rdi+78],edx
@@:
add rsp,20
jmp return
UpdateCraftItems:
jmp newmem
nop 2
return:
registersymbol(UpdateCraftItems)
[DISABLE]
UpdateCraftItems:
db 89 57 78 48 83 C4 20
unregistersymbol(UpdateCraftItems)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: Cyberpunk2077.exe+17CFEA0
Cyberpunk2077.exe+17CFE91: 03 CB - add ecx,ebx
Cyberpunk2077.exe+17CFE93: 48 8B 5C 24 30 - mov rbx,[rsp+30]
Cyberpunk2077.exe+17CFE98: 0F 49 C1 - cmovns eax,ecx
Cyberpunk2077.exe+17CFE9B: 3B C2 - cmp eax,edx
Cyberpunk2077.exe+17CFE9D: 0F 4E D0 - cmovle edx,eax
// ---------- INJECTING HERE ----------
Cyberpunk2077.exe+17CFEA0: 89 57 78 - mov [rdi+78],edx
// ---------- DONE INJECTING ----------
Cyberpunk2077.exe+17CFEA3: 48 83 C4 20 - add rsp,20
Cyberpunk2077.exe+17CFEA7: 5F - pop rdi
Cyberpunk2077.exe+17CFEA8: C3 - ret
}
</AssemblerScript>
</CheatEntry>
</CheatEntries>
</CheatTable>