Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on calling IL2CPP::Callback::Initialize(); #61

Open
PetrSeifert opened this issue Oct 27, 2024 · 0 comments
Open

Crash on calling IL2CPP::Callback::Initialize(); #61

PetrSeifert opened this issue Oct 27, 2024 · 0 comments

Comments

@PetrSeifert
Copy link

PetrSeifert commented Oct 27, 2024

What is the game you are using with IL2CPP Resolver?

https://store.steampowered.com/app/2659050/Movies_Tycoon/

Details:

For the first time, I am trying to create a cheat for the Unity IL2CPP game. This repo seemed useful, so I tried implementing it together with Minhook, but I am crashing on the callback initialization. 

Here is information from the dump file:

ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000008

EXCEPTION_PARAMETER2:  0000000000000000

STACK_TEXT:  
000000e6`5981f868 00007ffa`982b1d3a     : 00000223`206ba5f0 00000225`33b34480 00000000`00000000 00007ffa`60ac1600 : 0x0
000000e6`5981f870 00007ffa`982b2c35     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : IL2CPP!IL2CPP::Callback::Initialize+0xea
000000e6`5981f8e0 00007ffb`3d79257d     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : IL2CPP!MainThread+0xf5
000000e6`5981f920 00007ffb`3e2eaf08     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x1d
000000e6`5981f950 00000000`00000000     : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x28


FAULTING_SOURCE_LINE:  E:\Programming\IL2CPP-Cheat\Il2cpp_Resolver\API\Callback.hpp

FAULTING_SOURCE_FILE:  E:\Programming\IL2CPP-Cheat\Il2cpp_Resolver\API\Callback.hpp

FAULTING_SOURCE_LINE_NUMBER:  56

FAULTING_SOURCE_CODE:  
    70: 
    71: 		CComponent* GetComponentByIndex(il2cppObject* m_pSystemType, unsigned int m_uIndex = 0U)
    72: 		{
    73: 			il2cppArray<CComponent*>* m_pComponents = GetComponents(m_pSystemType);
>   74: 			if (!m_pComponents || m_uIndex >= m_pComponents->m_uMaxLength) return nullptr;
    75: 
    76: 			return m_pComponents->operator[](m_uIndex);
    77: 		}
    78: 
    79: 		CComponent* GetComponentByIndex(const char* m_pSystemTypeName, unsigned int m_uIndex = 0U)

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Here is my repo with minimal reproduction: https://github.com/PetrSeifert/IL2CPP_Cheat/tree/mcve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant