Jump to content
Moopler
  • 0
phaseone

Question kami from asm to c++

Question

Could anyone help? I am trying to convert kami script to c++. I believe the two lines below activates the kami codecave. I checked that dd means define dword. Other tutorials only show how to activate a codecave with jmp or call. How do I code the  "dd Kami" in c++ to activate the kami? 

017D2770+70:
dd Kami

 

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 1
Guest

Yes, take the square-root of 3.249.570.025, shift it 16 bits left, or it with (146.637 / 3) and translate to hexadecimal.

static_cast<unsigned int>((3.249.570.025 << 16) | (146.637 / 3)) = 0xDEADBEEF. Now you've solved the question of Christmas.

Share this post


Link to post
  • 1

Try to understand how bypassless hooking works, if you understand the basic concept you can make your own func for it. Else just get a non bypassless version of the script.

Edited by Taku

Share this post


Link to post
  • 0
On 6-11-2015 18:19:04, Sprux said:

Yes, take the square-root of 3.249.570.025, shift it 16 bits left, or it with (146.637 / 3) and translate to hexadecimal.

static_cast<unsigned int>((3.249.570.025 << 16) | (146.637 / 3)) = 0xDEADBEEF. Now you've solved the question of Christmas.

Your reply is unrelated to his question.

@phaseone

Airride wrote something about bypassless hooking on CCPlz. I suggest you read this: https://ccplz.net/resources/making-script-bypassless.214/

Share this post


Link to post
  • 0
Guest

You're both (Taku and Razz) misleading him greatly. His question was simple: How do I change the value of an address like CE's address define dword function. It's very simple.

__declspec(naked) void __stdcall Kami
{
	__asm do_magic;
}

void EnableShitFuckingTwatAssKami()
{
	const int address = 0x017D2770 + 0x70; // address

	// one-liner:
	*reinterpret_cast<void**>(address) = Kami;

	// Breaking it up:
	void** address_pointer = reinterpret_cast<void**>(address); //Create a pointer-object to an instance of type void*
	*address_pointer = Kami; // Set the value of the void* pointer (set the void*-value of the pointer) to the address of Kami (the function above).
}

 

Now please, if you're gonna mark my post as "unrelated" atleast make sure your own posts aren't unrelated aswell :grin:

Edited by Sprux
dasdasdad

Share this post


Link to post
  • 0

reason i (and probably rez) didn't c&p the code was to make him look into it. I think if he is going to work with bypassless scripts it would be good to try and understand how it works before converting it to c++/inline asm.

Edited by Taku
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×