Jormungandr
Member
- Joined
- Oct 23, 2023
- Messages
- 20
Hello there. I have been trying for a while now to make it so that this script:
```[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(ItemSummonRaid)
label(checkcountry)
label(failed)
label(exit)
label(checkleader)
newmem:
call ps_game.exe+4ECF0
originalcode:
pushad
movzx eax,word ptr [esi+0x160]
movzx ebx,word ptr [edi+0x160]
cmp eax,(int)45
je checkcountry
cmp ebx,(int)45
je checkcountry
jmp ItemSummonRaid
checkcountry:
cmp eax,ebx
je ItemSummonRaid
movzx eax,byte ptr [esi+0x12d]
movzx ebx,byte ptr [edi+0x12d]
cmp eax,ebx
jne failed
ItemSummonRaid:
mov eax,dword ptr ds:[edi+0x58FC]
mov ecx,dword ptr ds:[edi+0x5900]
lea eax,dword ptr ds:[eax+eax*2] // eax=bag,ecx=slot
lea edx,dword ptr ds:[ecx+eax*8]
imul edx,edx,4
mov eax,dword ptr ds:[edi+edx+0x1C0]
mov eax,dword ptr ds:[eax+30]
cmp [eax],(int)100045 //orginal item id
popad
jne checkleader //success addr
exit:
jmp returnhere
checkleader:
push eax //party table
push ecx //leader id
mov eax,[edi+17f4]
mov ecx,[eax+0c] //leader id
imul ecx,ecx,8
add ecx,18
mov ecx,[eax+ecx] //leader address
cmp edi,ecx //compare address check is leader
pop ecx
pop eax
je 0049e4ea //if yes
jmp 0049E517
failed:
popad
jmp 0049E517
"ps_game.exe"+9E4E1:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
"ps_game.exe"+9E4E1:
call ps_game.exe+4ECF0```
works for sub-leaders, but all of the addresses that I have tried failed. Could someone explain to me how to get the said idea to work?
Thank you!
```[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(ItemSummonRaid)
label(checkcountry)
label(failed)
label(exit)
label(checkleader)
newmem:
call ps_game.exe+4ECF0
originalcode:
pushad
movzx eax,word ptr [esi+0x160]
movzx ebx,word ptr [edi+0x160]
cmp eax,(int)45
je checkcountry
cmp ebx,(int)45
je checkcountry
jmp ItemSummonRaid
checkcountry:
cmp eax,ebx
je ItemSummonRaid
movzx eax,byte ptr [esi+0x12d]
movzx ebx,byte ptr [edi+0x12d]
cmp eax,ebx
jne failed
ItemSummonRaid:
mov eax,dword ptr ds:[edi+0x58FC]
mov ecx,dword ptr ds:[edi+0x5900]
lea eax,dword ptr ds:[eax+eax*2] // eax=bag,ecx=slot
lea edx,dword ptr ds:[ecx+eax*8]
imul edx,edx,4
mov eax,dword ptr ds:[edi+edx+0x1C0]
mov eax,dword ptr ds:[eax+30]
cmp [eax],(int)100045 //orginal item id
popad
jne checkleader //success addr
exit:
jmp returnhere
checkleader:
push eax //party table
push ecx //leader id
mov eax,[edi+17f4]
mov ecx,[eax+0c] //leader id
imul ecx,ecx,8
add ecx,18
mov ecx,[eax+ecx] //leader address
cmp edi,ecx //compare address check is leader
pop ecx
pop eax
je 0049e4ea //if yes
jmp 0049E517
failed:
popad
jmp 0049E517
"ps_game.exe"+9E4E1:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
"ps_game.exe"+9E4E1:
call ps_game.exe+4ECF0```
works for sub-leaders, but all of the addresses that I have tried failed. Could someone explain to me how to get the said idea to work?
Thank you!