Unlimited Ammo

Posts 1–10 of 10 · Page 1 of 1
Unlimited Ammo
Code:
#define ADR_UNLAMMO1  0xAFDAFC
#define ADR_UNLAMMO2  0x98BCC8

DWORD AmmoCall;

_declspec(naked)void iAsm_UnlAmmo_Patch()
{
__asm
{
  mov eax,dword ptr ds:[ADR_UNLAMMO1]
  test eax,eax
  jmp loc_retn
  push 8
  call AmmoCall
  add esp,4
  test eax,eax
  je loc_xor
  mov dword ptr ds:[eax],ADR_UNLAMMO2
  mov word ptr ds:[eax+4],0
  mov dword ptr ds:[ADR_UNLAMMO1],eax
  retn
loc_xor:
  xor eax,eax
  mov dword ptr ds:[ADR_UNLAMMO1],eax
loc_retn:
  retn
}
}

AmmoCall = 0x803ED4;

void *DetJmp(BYTE *src, const BYTE *dst, const int len) 
{
 BYTE *jmp =(BYTE*)malloc(len+5);
 DWORD dwBack;

 VirtualProtect(src, len, PAGE_READWRITE, &dwBack);
 memcpy(jmp, src, len); 
 jmp += len;
 jmp[0] = 0xE9;
 *(DWORD*)(jmp+1) =(DWORD)(src+len - jmp) - 5;

 src[0] = 0xE9;
 *(DWORD*)(src+1) =(DWORD)(dst - src) - 5;
 for(int i=5; i<len; i++) src[i] = 0x90;
 VirtualProtect(src, len, dwBack, &dwBack);

 return(jmp-len);
}
Code:
if(unlAmmo == 1)
{
AmmoCall = 0x803ED4;
DetJmp((BYTE*)ADR_UAMMO,(BYTE*)iAsm_UnlAmmo_Patch,5);
}
Credits:xCyniu(Code)
Hans211(Detour)
Write2Mem ( 0x004D3B8E, "\xC3", 1);

.. ur work is unseless..
there's a easyer way to do unl_ammo ASM, get a asm bypass and add asm code.

But good job tho!.
Its working For WARROCK PH ??


"Its working po ba sa warrock philippines???"
LOL. it will crash if you have no Bypass, i have just tried it earlier...
Hmm... Considering its in warrock international, my guess is no.
Quote Originally Posted by rodolfgonzales4 View Post
Its working For WARROCK PH ??
Quote Originally Posted by scraprecon View Post
Hmm... Considering its in warrock international, my guess is no.
Since they're practically the same game I'm sure some derivative, if not the same method, can be used with similar results.
Will it actually work?
G'Night
Quote Originally Posted by iToXiK View Post
Will it actually work?
G'Night
Well, it's war-rock international source, but since war-rock international and war-rock Philippines and similar game the method will be changed a little but not much so if you tried this code it would crash but!, if you changed the method it should work!.
Posts 1–10 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us