Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format pe dll
- include '%fasmi%\win32ax.inc'
- ;##################################################### MACROS
- macro iskey __key {
- invoke GetAsyncKeyState,__key
- test eax,eax
- }
- macro findfunction __moduleh,[__fnam] {
- invoke GetProcAddress,__moduleh,__fnam
- }
- ;importfunc Module_Handle,Handler_Position,Procedure_Name
- ;macro importfunc __mh,__base,__pos,[__procnam] {
- macro importfunc __mh,__pos,[__procnam] {
- push eax
- invoke GetProcAddress,__mh,__procnam
- mov dword [_address+(__pos*4)],eax
- pop eax
- }
- ;writeretn Destination_Address,Number_Of_Arguments_of_the_function
- macro writeretn __destination,__retnval {
- push 0
- push 3
- call @f
- retn __retnval*4
- @@:
- push __destination
- push -1
- call [WriteProcessMemory]
- }
- ;hook Source_Address,Destination_Address
- macro hook __source,__dest {
- pushad
- mov edx,__dest
- sub edx,__source
- sub edx,5
- mov ecx,@f
- sub ecx,4
- mov dword [ecx],edx
- push 0
- push 5
- call @f
- db 0e9h
- dd 0
- @@:
- push __source
- push -1
- call [WriteProcessMemory]
- popad
- }
- ;ask FunctionToCall,'MyQuestion'
- macro ask __tokall,[__question] {
- invoke MessageBoxA,0,__question,'The Green Herb',MB_YESNO
- cmp eax,IDYES
- jne @f
- call __tokall
- @@:
- }
- ;writexor Destination_Address
- macro writexor __dest {
- push 0
- push 2
- call @f
- xor eax,eax
- @@:
- push __dest
- push -1
- call [WriteProcessMemory]
- }
- ;writeor Destination_Address
- macro writeor __dest {
- push 0
- push 2
- call @f
- or al,1
- @@:
- push __dest
- push -1
- call [WriteProcessMemory]
- }
- ;#####################################################
- ;#####################################################
- ;#####################################################
- ;#####################################################
- section '_Root' code readable executable writeable
- __________TheHerb:
- or al,1
- mov eax,$
- mov byte [eax],0c3h
- invoke CreateThread,0,0,mainproc,0,0,0
- or al,1
- retn
- ;=======##################============#######################
- ;Procedures
- mainproc:
- call initializer
- ask godmodehack,'Do you want to activate the God mode hack?'
- ask blindcellshack,'Do you want to make cells blind?'
- ask celllevel99,'Do you want to make all cells in the game lv. 99?'
- ask celllevel1,'Do you want to make all cells in the game lv. 1?'
- retn
- initializer:
- invoke LoadLibraryA,'entitiesmp.dll'
- mov [entitiesmp],eax
- invoke LoadLibraryA,'engine.dll'
- mov [engine],eax
- retn
- godmodehack:
- ;God mode hack procedure
- findfunction [entitiesmp],'?ReceiveDamage@CPlayer@@UAEXPAVCEntity@@PBUDamageInfo@@@Z'
- writeretn eax,2
- findfunction [entitiesmp],'?ReceiveDamage@CPlayer@@UAEXPAVCEntity@@W4DamageType@@MABV?$Vector@M$02@@2@Z'
- writeretn eax,5
- findfunction [entitiesmp],'?ReceiveDamage_OnGuard@CPlayer@@QAEXPBUDamageInfo@@PAVCEntity@@@Z'
- writeretn eax,2
- retn
- blindcellshack:
- ;Blind cells hack
- findfunction [entitiesmp],'?IsVisible@CNpcBase@@QAEHPAVCEntity@@@Z'
- push eax
- writexor eax
- pop eax
- add eax,2
- writeretn eax,1
- ;findfunction [entitiesmp],'?IsValidForEnemy@CNpcBase@@QAEHPAVCEntity@@@Z'
- ;push eax
- ;writeor eax
- ;pop eax
- ;add eax,2
- ;writeretn eax,1
- retn
- celllevelhook:
- mov eax,[esp+4]
- mov dword [ecx+7c0h],99
- retn 4
- celllevel99:
- ;Cells will be lvl 99, not obvious?
- findfunction [entitiesmp],'?SetLevel@CNpcBase@@QAEXJ@Z'
- hook eax,celllevelhook
- retn
- celllevelhook2:
- mov eax,[esp+4]
- mov dword [ecx+7c0h],1
- retn 4
- celllevel1:
- ;Cells will be lvl 1, not obvious?
- findfunction [entitiesmp],'?SetLevel@CNpcBase@@QAEXJ@Z'
- hook eax,celllevelhook2
- retn
- ;=======##################============#######################
- ;Junk
- entitiesmp dd 0
- engine dd 0
- _address rb 1;00*4 ;Cabe 100 procedimentos
- .end __________TheHerb
- db 13,11,0dh,0ah
- ___signature db 'The Green Herb; 11/2010; Brazil, Carlos',13,11,0dh,0ah
- db 'Put love in the things you do, belive in what you are, be what you want to be, thats the secret of life.'
- db 13,11,0dh,0ah
- section '_Leaf' fixups data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement