This makes most of the table useless:
Code: Select all
{ Game : tld.exe
Version: 1.97 85101 S
Date : 2021-11-03
Author : sub1to
public sealed class String : IComparable, ICloneable, IConvertible, IEnumerable, IComparable<string>, IEnumerable<char>, IEquatable<string> // TypeDefIndex: 289
// Fields
private int m_stringLength; // 0x10
private char m_firstChar; // 0x14
}
[ENABLE]
alloc(newmem,$ff,GameAssembly.dll)
alloc(string,$ff,GameAssembly.dll)
globalalloc(_uconsole_init,1,GameAssembly.dll)
label(returnhere)
label(code)
label(GameManager_Update_hook)
label(GameManager_Update_bytes)
registersymbol(GameManager_Update_hook)
registersymbol(GameManager_Update_bytes)
// class: GameManager
// RVA: 0xE652C0 Offset: 0xE642C0 VA: 0x7FFB0C8352C0
// public void Update() { }
aobScanModule(hook,GameAssembly.dll,26 FF CC CC 48 8B C4 55 57)
// class: Resources
// RVA: 0x2A0FFC0 Offset: 0x2A0EFC0 VA: 0x7FFB0E3DFFC0
// public static Object Load(string path) { }
aobScanModule(Resources_Load,GameAssembly.dll,40 57 48 83 ec ? 48 c7 44 24 ? ? ? ? ? 48 89 5c 24 ? 48 8b f9 80 3d ? ? ? ? ? 75 ? 48 8b 05 ? ? ? ? 48 63 90 ? ? ? ? 48 8b 05 ? ? ? ? 8b 8c 02 ? ? ? ? 45 33 c0 4c 89 44 24 ? 4c 89 44 24 ? 4c 89 44 24 ? 4c 8d 44 24 ? 8b 94 02 ? ? ? ? e8 ? ? ? ? 90 33 c9 ff 15 ? ? ? ? 90 c6 05 ? ? ? ? ? 48 8b 1d ? ? ? ? 48 8b 0d ? ? ? ? f6 81 ? ? ? ? ? 74 ? 83 b9 ? ? ? ? ? 75 ? e8 ? ? ? ? 33 d2 48 8b cb e8 ? ? ? ? 48 8b d8 48 8b 05)
// class: Object
// RVA: 0x2844950 Offset: 0x2843950 VA: 0x7FFB0E214950
// public static Object Instantiate(Object original) { }
aobScanModule(Object_Instantiate,GameAssembly.dll,40 53 48 83 ec ? 48 c7 44 24 ? ? ? ? ? 48 8b d9 80 3d ? ? ? ? ? 75 ? 48 8b 05 ? ? ? ? 48 63 90 ? ? ? ? 48 8b 05 ? ? ? ? 8b 8c 02 ? ? ? ? 45 33 c0 4c 89 44 24 ? 4c 89 44 24 ? 4c 89 44 24 ? 4c 8d 44 24 ? 8b 94 02 ? ? ? ? e8 ? ? ? ? 90 33 c9 ff 15 ? ? ? ? 90 c6 05 ? ? ? ? ? 48 8b 0d ? ? ? ? f6 81 ? ? ? ? ? 74 ? 83 b9 ? ? ? ? ? 75 ? e8 ? ? ? ? 45 33 c0 48 8b 15 ? ? ? ? 48 8b cb e8 ? ? ? ? 48 8b 05)
string:
dq 00 // +00 ptr
dq 00 // +08 padding
dd 08 // +10 len
db 'u' 0 'C' 0 'o' 0 'n' 0 's' 0 'o' 0 'l' 0 'e' 0 0
newmem:
GameManager_Update_bytes:
readMem(hook+4, 5)
jmp returnhere
code:
mov al, [_uconsole_init]
test al, al
jnz GameManager_Update_bytes
mov byte ptr [_uconsole_init], 1
lea rsp, [rsp-28]
mov [rsp+20], rcx
lea rcx, [string]
call Resources_Load
mov rcx, rax
call Object_Instantiate
mov rcx, [rsp+20]
lea rsp, [rsp+28]
jmp GameManager_Update_bytes
hook+4:
GameManager_Update_hook:
jmp code
returnhere:
[DISABLE]
GameManager_Update_hook:
readMem(GameManager_Update_bytes, 5)
unregistersymbol(GameManager_Update_hook)
unregistersymbol(GameManager_Update_bytes)
dealloc(newmem)
dealloc(string)
{
// ORIGINAL CODE - INJECTION POINT: GameAssembly.dll+E652C0
GameAssembly.dll+E652A6: CC - int 3
GameAssembly.dll+E652A7: E8 54 51 26 FF - call GameAssembly.dll+CA400
GameAssembly.dll+E652AC: CC - int 3
GameAssembly.dll+E652AD: E8 4E 51 26 FF - call GameAssembly.dll+CA400
GameAssembly.dll+E652B2: CC - int 3
GameAssembly.dll+E652B3: E8 48 51 26 FF - call GameAssembly.dll+CA400
GameAssembly.dll+E652B8: CC - int 3
GameAssembly.dll+E652B9: E8 42 51 26 FF - call GameAssembly.dll+CA400
GameAssembly.dll+E652BE: CC - int 3
GameAssembly.dll+E652BF: CC - int 3
// ---------- INJECTING HERE ----------
GameAssembly.dll+E652C0: 48 8B C4 - mov rax,rsp
GameAssembly.dll+E652C3: 55 - push rbp
// ---------- DONE INJECTING ----------
GameAssembly.dll+E652C4: 57 - push rdi
GameAssembly.dll+E652C5: 41 56 - push r14
GameAssembly.dll+E652C7: 48 8D 68 D8 - lea rbp,[rax-28]
GameAssembly.dll+E652CB: 48 81 EC 10 01 00 00 - sub rsp,00000110
GameAssembly.dll+E652D2: 48 C7 45 C0 FE FF FF FF - mov qword ptr [rbp-40],FFFFFFFFFFFFFFFE
GameAssembly.dll+E652DA: 48 89 58 08 - mov [rax+08],rbx
GameAssembly.dll+E652DE: 48 89 70 10 - mov [rax+10],rsi
GameAssembly.dll+E652E2: 0F 29 70 D8 - movaps [rax-28],xmm6
GameAssembly.dll+E652E6: 0F 29 78 C8 - movaps [rax-38],xmm7
}
You just have to instantiate an instance of uConsole, and then you press ~ (tilde) to open the console.
There is a GameManager.InstantiateConsole function, but it's a nullsub, so you have to instantiate it yourself.
To do so you call Resources.Load("uConsole"), and then call Object.Instantiate with the loaded resource.
List of console commands:
[Link]