Yes, and float values -- they stack up from time to time each turn.
I Don't know much about common variable-passing methods they used there.
But I was thinking about somehow creating assembly's separate thread and from there call functions to retrieve values -- in this case also lists.
Yet I can't imagine how it should be alike -- just an idea.
(...)
I managed to get unique resources and manpower.
Filtered through stacks with SHORT ID. (e.g. cmp [rbp-10],0)
also note filtering trough player-> majorempire.
I found that on SimulationProperty_PropertyWithMin:get_Value+b , unique resource values has smaller ids like 1,2,3,4...
Also am comparing against stack function return (cmp [RBP+08],GuiResource:GetStockValue+5e),
So, it might not be stable. I am not trusting stacks.
While,
From your script's only hero skill script works;
I mean sure, your script tries to get pointers but doesn't catch correctly -- probably AI’s values or other stuff.
(I need to get now Inf movement (kind have due invalid pointer at register cmp [r8],0) and invincible ships)
AI movement executing on player's turn behalf.
'cmp [r8],0' : Attempted to write in assembly a VALID POINTER check. Which would be great to have in case of…? Unfortunately, I was defeated at that. For some reason 'VirtualQuery' returns 0 -- which is not what I intend to -- while 'IsBadReadPtr' also returns well... let’s just say function crashes during self-call at 'IsBadReadPtr'. lol. I know that {$try} and {$except} exists and that works well ... yet I choose to try alternative way anyway. Yet another another way would be just do an LUACALL block (not like defense) and do 'readPointer(address)' and deal with returns. Yet that would be jumping from ASM to LUA/ASM or just LUA script and requires user to inject lua dll into …
this is 'infinite' movement script -- note that script causes crash and ce handles silently with TRY and EXCEPT--ish, am just saying needs improvement with comparing pointer at [r8] : (also in order to use this , use previously written get influence and dust which get's player majorempire data)
define(GET_MOVE,Amplitude.Unity.Simulation.Properties.SimulationProperty_PropertyWithMin:get_Value+4)
[ENABLE]
registersymbol(GET_MOVE)
alloc(ES2MOD_MOV,1,GET_MOVE)
label(ES2MOD_MOV_RET ES2MOD_MOV_O ES2MOD_MOV_EXIT)
label(ES2MOD_MOV_MOD_IDLE ES2MOD_MOV_MOD_MOVE)
label(ES2MOD_PTRCHECK)
ES2MOD_MOV:
db 48 89 0C 24
db 48 8B C1
cmp [rbp+D8],Fleet:get_CurrentMovementPoints+21 // IDLE STATE _ 1
je ES2MOD_MOV_MOD_IDLE
cmp [rbp+D8],Fleet:GeneratePathfindingData+4c //IDLE STATE _ 2 + ON _ MOVE 1 + SELECTION _ 1
je ES2MOD_MOV_MOD_MOVE
jmp ES2MOD_MOV_O
ES2MOD_MOV_MOD_IDLE:
// UPDATE MOVEMENT VALUE ON PLAYER SHIP SELECTION. ALSO DESELECT.
db 4C 8B 85 80 00 00 00 // fleet.
ES2MOD_PTRCHECK: // bring in back simple check...
db 4D 85 C0
jz ES2MOD_MOV_EXIT
db 49 81 F8 00 10 00 00
jb ES2MOD_MOV_EXIT
db 48 B8 FF FF FF FF FF FF FF 7F
db 49 39 C0
ja ES2MOD_MOV_EXIT
{$try}
// UPDATE MOVEMENT VALUE ON PLAYER SHIP SELECTION. ALSO DESELECT.
db 49 8B 40 48 // fleet.-> major empire //
db 4C 8B C0
mov rax,[ptr_EMPIRE]
db 4C 39 C0
jne ES2MOD_MOV_EXIT
db 48 8B C1
db C7 40 68 00 00 80 42
db F3 0F 10 40 68
jmp ES2MOD_MOV_RET
{$except}
db F3 0F 10 40 68
jmp ES2MOD_MOV_RET
ES2MOD_MOV_MOD_MOVE:
db F3 0F 10 40 68
jmp ES2MOD_MOV_RET
ES2MOD_MOV_O:
db F3 0F 10 40 68
JMP ES2MOD_MOV_RET
ES2MOD_MOV_EXIT:
db 48 8B C1
mov r8,ptr_EMPIRE
// Give another try :
db 4D 3B 20
db 49 B8 00 00 00 00 00 00 00 00
jne ES2MOD_MOV_O
db C7 40 68 00 00 80 42
db F3 0F 10 40 68
JMP ES2MOD_MOV_RET
GET_MOVE:
JMP ES2MOD_MOV
db 66 90
ES2MOD_MOV_RET:
[DISABLE]
dealloc(ES2MOD_MOV)
GET_MOVE:
db 48 89 0C 24 48 8B C1
unregistersymbol(GET_MOVE)
edit : Ok. I was pushing to 'weak'/small size that is why VirtualQuery didn't work. Minimum requirement 64(100). The problem was I was sending as rd argument too low or too high value into function.