GithubHelp home page GithubHelp logo

Comments (17)

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

image

from il2cpp_resolver.

sneakyevil avatar sneakyevil commented on September 27, 2024

Are you sure you're checking correct class or component?
Because I never had problem fetching public/private/protected field.

from il2cpp_resolver.

extremeblackliu avatar extremeblackliu commented on September 27, 2024

hi , at first i assume you are new user , what game you are trying to using with IL2CPPResolver? did you looked our API document or quick example? https://github.com/sneakyevilSK/IL2CPP_Resolver/blob/main/README.md.

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

Thank you to both for your answer and time, yes i am new to unity i used ILL2CPP Resolver from start and it works well i got almost all the things i wanted except the Private Fields thats why i asked. The game i am working on is NARAKA BLADEPOINT anyways i got the private field i wanted from a pointer since i wans't able to get it from the IL2CPP::GetField. Anyways i have another problem that is confusing me from start, see the image bellow.
image
The error is pretty descritive hoewer i ve created a threads with IL2CPP::Thread::Create and it does still crash my game (the only fix i could find is to bytepatch the GC jne to jmp to prevent it crash but i can't do that with the game anticheat active for obvius reasons) so my best way is the thread way. This is how my code looks, i hope you guys can help me!

BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved)
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
		naraka_hooks::Run();
		break;
	}
	return TRUE;
}

void naraka_hooks::initialize()
{	
	AllocConsole();
	FILE* pFile = nullptr;
	freopen_s(&pFile, xorstr_("CONOUT$"), xorstr_("w"), stdout);
	printf("Starting...\r\n");

	MemoryMgr::Initialize();
	naraka_hooks::_returns::oPresent = MemoryMgr::SwapPointer<naraka_hooks::tPresent>(offsets::ISwapChainGameOverlay, (uintptr_t)naraka_hooks::hkPresent);

	while (true)
	{
		Sleep(1500);
	}
}

void naraka_hooks::Run()
{
	static bool il2cpp_initialized = IL2CPP::Initialize();

	if (il2cpp_initialized)
		IL2CPP::Thread::Create(naraka_hooks::initialize);
}

PS: I do my render stuff on present hook, i ve also saw that many other projects do it this way, the only difference is that i am using the steam overlay and not kiero.

from il2cpp_resolver.

extremeblackliu avatar extremeblackliu commented on September 27, 2024

il2cppthread issue is a unresolved bug here:#9 .
is your private field from your ss is from static class?

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

Its not an static class but the class is valid i ve checked it on cheat engine and says the correct name of the class, class name by the way is AntiCheatSDK idk if it have something to do? btw you can access to the class via instance.
image

from il2cpp_resolver.

extremeblackliu avatar extremeblackliu commented on September 27, 2024

yes, access via instance ,problem sovled.

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

Is not there are any way to solve the crash issue? it does happends with any function you call dones't matter w2s, transform, custom it does happends with all xd i feel like that bug cap the library i ve tried to fix my self by trying many things but it does always happends uhmmm

from il2cpp_resolver.

sneakyevil avatar sneakyevil commented on September 27, 2024

Hook any function and run your stuff there.

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

Hook any function and run your stuff there.

i ve thinked about it, but as far i know that way i won't be able to render with imgui or other guis, right?

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

Also i know this is a bit offtopic but i don't know how t find the OnUpdate Function, i can't even find it on DnSpy or ida :(

from il2cpp_resolver.

extremeblackliu avatar extremeblackliu commented on September 27, 2024

Also i know this is a bit offtopic but i don't know how t find the OnUpdate Function, i can't even find it on DnSpy or ida :(

i had cheat on the game like 6 months ago, i looked up my old source, there are multiple OnUpdate function, the gameassembly.dll is packed by vmprotect ,you need manually find and check it.
you cant call unity functions in il2cpp thread, is still a bug,maybe it get fix in future

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

Also i know this is a bit offtopic but i don't know how t find the OnUpdate Function, i can't even find it on DnSpy or ida :(

i had cheat on the game like 6 months ago, i looked up my old source, there are multiple OnUpdate function, the gameassembly.dll is packed by vmprotect ,you need manually find and check it. you cant call unity functions in il2cpp thread, is still a bug,maybe it get fix in future

Well i do not think that VMProtect has something to do, i have dumped all dlls and i can see its code clearly on dnspy and ida pro for all functions, what i can't find is a OnUpdate function to hook, i only found functions like this public extern void <>iFixBaseProxy_onUpdateItems(); wich does nothing when hooked even with the correct address i ve also tried to hook others function like combo etc and these works but they aren't called every frame just when you attack etc, can you give me some function name that is called every frame?

from il2cpp_resolver.

sneakyevil avatar sneakyevil commented on September 27, 2024

Your issue was about private fields, we are not gonna discuss here about you having problem finding function to hook as it is not related to library itself. If you having problem to find function that will get called every frame you shouldn't even consider doing something related to that game. You can easily check Unity docs and find out there are multiple predefined function that are not called "OnUpdate" and you can easily hook that aswell. Besides that you could reverse yourself unityplayer.dll and find out there is function that is called every frame that you could hook.

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

Okay so after a while trying i ve successfully hooked a function inside camera that execute everyframe and i ve did my stuff here with a cache system so i do my loging stuff on camera hook and i can render on present, thx you guys sorry for hijacking the topic lol ^^

from il2cpp_resolver.

sneakyevil avatar sneakyevil commented on September 27, 2024

You can check my last issue post at #9 (comment) and try run you code in present hook, gl.

from il2cpp_resolver.

kashiwazaki2 avatar kashiwazaki2 commented on September 27, 2024

You can check my last issue post at #9 (comment) and try run you code in present hook, gl.

thx for the hint, ill try it out today, anyway i am trying to get around their caller check, i din't expected that they check from where is the function being called like others anticheat hehehe

from il2cpp_resolver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.