Solved __asm doesn't like when I try to store LPD3DDEVICE9

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

SICGames88

Newbie
Full Member
Nobleman
Sep 6, 2015
70
768
0
my previous thread in IDA Pro about finding the EndScene. It seems like I already found it and validated through the D3D9 Test Enviroment program from mpqh site.

I debugged the app through ollydbg 2.0.1 at the address provided. I looked at a Youtube tutorial as well. in my Naked function I have this:

C++:
void __declspec(naked) hkEndScene() {
	
	__asm {
		/*
			CPU Disasm
			Address   Hex dump          Command                                  Comments
			5A096D50 / .  6A 20         PUSH 20
			5A096D52 | .B8 A9780B5A   MOV EAX, 5A0B78A9; Entry point
			5A096D57 | .E8 9E970100   CALL 5A0B04FA
			5A096D5C | .  8B7D 08       MOV EDI, DWORD PTR SS : [EBP + 8]		   <--- Injection point.
			5A096D5F | .  33F6          XOR ESI, ESI
		  */
		mov [lpD3D9Device],[EBP+8] << COMPILES WITH ERROR INVALID OPERAND.
		xor esi,esi                                
		jmp[endSceneJumpBackAddr]
	}

}
Do I need to probe around for a better hooking spot? What do I need to do? Also yes EBP + 8 contains the D3D9Device pointer also was validated while I stepped through the test program.
The jump back address is Addy += 5; The addr of injection is at (originalAddr + 0xC).
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
mov [lpD3D9Device],[EBP+8]

Assembly doesnt like a double dereference.

you need to load the value you want and then do it.

C++:
mov eax, [ebp+8]
mov [lpd3d9device], eax
 
Last edited by a moderator:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods