help with code

newbreedsoftwarenewbreedsoftware Posts: 2
edited January 18, 2017 11:40AM in .NET Reflector
Hello all, I am a new user of .Net Reflector and am aspiring to be a security auditor. My first project is dealing with .dll files. I have found the section(s) of code I would like to edit but I am not 100% sure I am doing it correctly, so any feedback would be much helpful! I have added a link to the screenshot so you can better understand what I am working with. The section I a trying to edit is in a sub called DealDamage. I am basically trying to modify the character in the game so god mode is enabled. So the code I would like to edit is critAttack to always be true, AimType to always be Head (0), and damage taken to always be 0. I have also added the section of code I am looking at below with my notes on the parts I think need to be edited. ... s.jpg?dl=0

0 ldarg.3
1 brfalse -> (5) ldarg.0
2 ldarg.0
3 ldc.i4.1
4 stfld System.Boolean Actor::critAttack
5 ldarg.0 <do I change this to ldarg.1 to make the critAttack boolean always return True?
6 ldarg.s -> (3) aim (Actor/AimType)
7 stfld Actor/AimType Actor::attackAim
8 ldarg.2 <do I change this to ldarg.0 for always headshot? AimType variables are 0 = Head, 1 = Torso, 2 = Legs
9 ldnull
10 call System.Boolean UnityEngine.Object::op_Inequality(UnityEngine.Object,UnityEngine.Object)
11 brfalse -> (25) ldarg.0
12 ldarg.0
13 callvirt System.Single Actor::get_Health()
14 ldarg.1 <for infinite health would I change this to ldc.i4 999999 ?
15 conv.r4
16 sub <change to add to increase health instead of decrease ?
17 ldc.r4 0
18 bgt.un -> (25) ldarg.0
19 ldarg.0
20 ldarg.2
21 stfld Weapon Actor::killedBy
22 ldarg.2
23 ldarg.0
24 callvirt System.Void Weapon::DoForcefulHitEffect(Actor)
25 ldarg.0
26 dup
27 callvirt System.Single Actor::get_health()
28 ldarg.1
29 conv.r4
30 sub
31 callvirt System.Void Actor::set_Health(System.Single)
32 ldarg.1
33 ldc.i4.0
34 bgt -> (146) ret
35 ldarg.2
36 ldnull


Sign In or Register to comment.