MCPcopy Create free account
hub / github.com/Norbyte/ositools / FindCustomStatsEoCApp

Method FindCustomStatsEoCApp

OsiInterface/DataLibrariesEoCApp.cpp:643–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641
642
643 void LibraryManager::FindCustomStatsEoCApp()
644 {
645 Pattern p;
646 p.FromString(
647 "48 89 5D 60 " // mov [rbp+0D0h+var_70], rbx
648 "0F B6 88 B0 00 00 00 " // movzx ecx, byte ptr [rax+0B0h]
649 "41 3A CF " // cmp cl, r15b
650 "F2 0F 11 75 08 " // movsd [rbp+0D0h+var_C8], xmm6
651 "48 8B 4E 18 " // mov rcx, [rsi+18h]
652 "C7 45 B0 03 00 00 00 " // mov [rbp+0D0h+var_120], 3
653 // Replacement: c6 45 f8 01 mov BYTE PTR [rbp-0x8],0x1
654 "0F 94 45 F8 " // setz [rbp+0D0h+var_D8]
655 );
656
657 p.Scan(moduleStart_, moduleSize_, [this](const uint8_t * match) {
658 UICharacterSheetHook = match + 30;
659 }, false);
660
661 Pattern p2;
662 p2.FromString(
663 "48 03 93 D0 00 00 00 " // add rdx, [rbx+0D0h]
664 "E8 XX XX XX XX " // call ecs__EntityWorld__ActivateSystemInternal
665 "48 8B 05 XX XX XX XX " // mov rax, cs:ls__GlobalSwitches
666 "80 B8 F3 0B 00 00 01 " // cmp byte ptr [rax+0BF3h], 1
667 // Replacement: 90 90
668 "75 XX " // jnz short loc_1415A124C
669 "48 6B 15 XX XX XX XX 38 " // imul rdx, cs:qword_1428F14F0, 38h
670 "48 8B CB " // mov rcx, rbx
671 );
672
673 p2.Scan(moduleStart_, moduleSize_, [this](const uint8_t * match) {
674 if (ActivateClientSystemsHook == nullptr) {
675 ActivateClientSystemsHook = match + 26;
676 } else {
677 ActivateServerSystemsHook = match + 26;
678 }
679 });
680
681 Pattern p3;
682 p3.FromString(
683 // Replacement: C3 (retn)
684 "4C 8B DC " // mov r11, rsp
685 "48 81 EC 88 00 00 00 " // sub rsp, 88h
686 "48 8B 05 XX XX XX XX " // mov rax, cs:__security_cookie
687 "48 33 C4 " // xor rax, rsp
688 "48 89 44 24 70 " // mov [rsp+88h+var_18], rax
689 "48 8B 05 XX XX XX XX " // mov rax, cs:?s_Ptr@PlayerManager@ls@@1PEAV12@EA
690 "49 8D 53 A8 " // lea rdx, [r11-58h]
691 "48 8B 0D XX XX XX XX " // mov rcx, cs:qword_142940598
692 "49 89 43 98 " // mov [r11-68h], rax
693 "48 8D 05 " // lea rax, ecl__CustomStatsProtocolSomething__vftable
694 );
695
696 p3.Scan(moduleStart_, moduleSize_, [this](const uint8_t * match) {
697 CustomStatUIRollHook = match;
698 });
699
700 Pattern p4;

Callers

nothing calls this directly

Calls 3

DebugFunction · 0.85
FromStringMethod · 0.80
ScanMethod · 0.80

Tested by

no test coverage detected