praydog / REFramework

Scripting platform, modding framework and VR support for all RE Engine games
https://cursey.github.io/reframework-book/
MIT License
2.74k stars 340 forks source link

MHRise Sunbreak Demo: Program integrity check failed. #393

Closed Synthlight closed 2 years ago

Synthlight commented 2 years ago

This happens with the 1832eef build (on Nexus) as well as the latest nightly, 4c86a89. I can run the game just fine without the REF dinput8.dll so it's gotta be detecting the injection. (All files validate without issue. No plugins or other injection dlls.)

I've also tried the latest REF (4c86a89) with the updated RE3 and it works there without issue so I don't know what they did special for the Sunbreak demo.

image

The log ends before hooking if dismissed right away:

[2022-06-16 23:49:44.170] [REFramework] [info] REFramework entry
[2022-06-16 23:49:44.170] [REFramework] [info] Game Module Addr: 7ff6f6770000
[2022-06-16 23:49:44.170] [REFramework] [info] Game Module Size: e724000
[2022-06-16 23:49:44.170] [REFramework] [info] Preallocated buffer: 7ff6f6760fc0
[2022-06-16 23:49:44.170] [REFramework] [info] Getting OS version information...
[2022-06-16 23:49:44.170] [REFramework] [info] OS Version Information
[2022-06-16 23:49:44.170] [REFramework] [info]  Major Version: 10
[2022-06-16 23:49:44.170] [REFramework] [info]  Minor Version: 0
[2022-06-16 23:49:44.170] [REFramework] [info]  Build Number: 17763
[2022-06-16 23:49:44.170] [REFramework] [info]  Platform Id: 2
[2022-06-16 23:49:44.170] [REFramework] [info] Disclaimer: REFramework does not send this information to the developers or any other third party.
[2022-06-16 23:49:44.170] [REFramework] [info] This information is only used to help with the development of REFramework.
[2022-06-16 23:49:45.637] [REFramework] [info] [PluginLoader] Module path C:\Program Files (x86)\Steam\steamapps\common\MONSTER HUNTER RISE SUNBREAK DEMO\MHRiseSunbreakDemo.exe
[2022-06-16 23:49:45.637] [REFramework] [info] [PluginLoader] Creating directories C:\Program Files (x86)\Steam\steamapps\common\MONSTER HUNTER RISE SUNBREAK DEMO\reframework\plugins
[2022-06-16 23:49:45.637] [REFramework] [info] [PluginLoader] Loading plugins...
[2022-06-16 23:49:48.274] [REFramework] [info] REFramework shutting down...

And here's a log where I leave it up for 5-10 seconds:

[2022-06-16 23:52:12.973] [REFramework] [info] REFramework entry
[2022-06-16 23:52:12.973] [REFramework] [info] Game Module Addr: 7ff6f6770000
[2022-06-16 23:52:12.973] [REFramework] [info] Game Module Size: e724000
[2022-06-16 23:52:12.973] [REFramework] [info] Preallocated buffer: 7ff6f6760fc0
[2022-06-16 23:52:12.973] [REFramework] [info] Getting OS version information...
[2022-06-16 23:52:12.973] [REFramework] [info] OS Version Information
[2022-06-16 23:52:12.973] [REFramework] [info]  Major Version: 10
[2022-06-16 23:52:12.973] [REFramework] [info]  Minor Version: 0
[2022-06-16 23:52:12.973] [REFramework] [info]  Build Number: 17763
[2022-06-16 23:52:12.973] [REFramework] [info]  Platform Id: 2
[2022-06-16 23:52:12.973] [REFramework] [info] Disclaimer: REFramework does not send this information to the developers or any other third party.
[2022-06-16 23:52:12.973] [REFramework] [info] This information is only used to help with the development of REFramework.
[2022-06-16 23:52:14.435] [REFramework] [info] [PluginLoader] Module path C:\Program Files (x86)\Steam\steamapps\common\MONSTER HUNTER RISE SUNBREAK DEMO\MHRiseSunbreakDemo.exe
[2022-06-16 23:52:14.435] [REFramework] [info] [PluginLoader] Creating directories C:\Program Files (x86)\Steam\steamapps\common\MONSTER HUNTER RISE SUNBREAK DEMO\reframework\plugins
[2022-06-16 23:52:14.436] [REFramework] [info] [PluginLoader] Loading plugins...
[2022-06-16 23:52:19.441] [REFramework] [info] Last chance encountered for hooking
[2022-06-16 23:52:20.441] [REFramework] [info] Sending rehook request for D3D
[2022-06-16 23:52:20.443] [REFramework] [info] Hooking D3D12
[2022-06-16 23:52:20.444] [REFramework] [info] Creating dummy device
[2022-06-16 23:52:20.448] [REFramework] [info] D3D12CreateDevice appears to be hooked, temporarily unhooking
[2022-06-16 23:52:20.524] [REFramework] [info] Restoring hooked bytes for D3D12CreateDevice
[2022-06-16 23:52:20.524] [REFramework] [info] Dummy device: 27186528440
[2022-06-16 23:52:20.524] [REFramework] [info] Creating dummy DXGI factory
[2022-06-16 23:52:20.524] [REFramework] [info] Creating dummy command queue
[2022-06-16 23:52:20.538] [REFramework] [info] Creating dummy swapchain
[2022-06-16 23:52:20.541] [REFramework] [info] Querying dummy swapchain
[2022-06-16 23:52:20.541] [REFramework] [info] Finding command queue offset
[2022-06-16 23:52:20.541] [REFramework] [info] Found command queue offset: 160
[2022-06-16 23:52:20.562] [REFramework] [info] Initializing hooks
[2022-06-16 23:52:20.562] [REFramework] [info] [PointerHook] Hooking 7ffdd94e45a8->7ffdd9474910 to 7ffdad038990
[2022-06-16 23:52:20.562] [REFramework] [info] [PointerHook] Hooking 7ffdd94e45d0->7ffdd948eec0 to 7ffdad038bd0
[2022-06-16 23:52:20.562] [REFramework] [info] [PointerHook] Hooking 7ffdd94e45d8->7ffdd94d4b60 to 7ffdad038e70
[2022-06-16 23:52:20.562] [REFramework] [info] Resuming 17600
[2022-06-16 23:52:20.562] [REFramework] [info] Resuming 2876
[2022-06-16 23:52:20.562] [REFramework] [info] Resuming 16992
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 17320
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 19452
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 18452
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 880
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 16968
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 18508
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 12516
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 15444
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 15380
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 16104
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 19356
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 18768
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 17800
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 15576
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 15764
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 17848
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 1844
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 15496
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 18044
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 19248
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 15768
[2022-06-16 23:52:20.563] [REFramework] [info] Resuming 13600
[2022-06-16 23:52:20.584] [REFramework] [info] Hooked DirectX 12
[2022-06-16 23:52:30.594] [REFramework] [info] Last chance encountered for hooking
[2022-06-16 23:52:31.595] [REFramework] [info] Sending rehook request for D3D
[2022-06-16 23:52:31.596] [REFramework] [info] Unhooking D3D12
[2022-06-16 23:52:31.596] [REFramework] [info] Hooking D3D12
[2022-06-16 23:52:31.596] [REFramework] [info] Creating dummy device
[2022-06-16 23:52:31.597] [REFramework] [info] D3D12CreateDevice appears to be hooked, temporarily unhooking
[2022-06-16 23:52:31.656] [REFramework] [info] Restoring hooked bytes for D3D12CreateDevice
[2022-06-16 23:52:31.656] [REFramework] [info] Dummy device: 2718699b5d0
[2022-06-16 23:52:31.656] [REFramework] [info] Creating dummy DXGI factory
[2022-06-16 23:52:31.657] [REFramework] [info] Creating dummy command queue
[2022-06-16 23:52:31.670] [REFramework] [info] Creating dummy swapchain
[2022-06-16 23:52:31.672] [REFramework] [info] Querying dummy swapchain
[2022-06-16 23:52:31.672] [REFramework] [info] Finding command queue offset
[2022-06-16 23:52:31.672] [REFramework] [info] Found command queue offset: 160
[2022-06-16 23:52:31.689] [REFramework] [info] Initializing hooks
[2022-06-16 23:52:31.689] [REFramework] [info] [PointerHook] Hooking 7ffdd94e45a8->7ffdd9474910 to 7ffdad038990
[2022-06-16 23:52:31.689] [REFramework] [info] [PointerHook] Hooking 7ffdd94e45d0->7ffdd948eec0 to 7ffdad038bd0
[2022-06-16 23:52:31.689] [REFramework] [info] [PointerHook] Hooking 7ffdd94e45d8->7ffdd94d4b60 to 7ffdad038e70
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 17600
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 2876
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 16992
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 17320
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 19452
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 18452
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 880
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 16968
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 18508
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 18912
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 3624
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 3620
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 3632
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 17676
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 4736
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 3892
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 13788
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 18944
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 15452
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 18212
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 18644
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 16340
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 13392
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 16600
[2022-06-16 23:52:31.689] [REFramework] [info] Resuming 13952
[2022-06-16 23:52:31.712] [REFramework] [info] Hooked DirectX 12
[2022-06-16 23:52:31.959] [REFramework] [info] REFramework shutting down...
praydog commented 2 years ago

If this isn't related to dinput8.dll itself, I can imagine it's because of the immediate code patch we do when REFramework starts. When RE8 came out initially, I had to create certain patch to stop the game from crashing due to some D3D errors.

It looks like they slapped the Enigma protector on the game. This particular message is a part of that protection.

The weird thing is I don't get this at all.

praydog commented 2 years ago

Can you try this build and see if it still persists?

dinput8.ZIP

Synthlight commented 2 years ago

That works, thank you. I also don't understand why some hit it and some don't. Race condition? It it loading it's protection faster than REF could patch it because it's a fast ssd? I can only guess. (I've seen a few comments on Nexus from others with the same issue.)

With the zip I can get the game to load and see the REF menu, but pressing insert doesn't seem to work. (Though I can interact with it using the mouse.) This is more of a separate issue though.

Thanks. This is enough for me to dump the hpp and update MHR-Editor.

praydog commented 2 years ago

Should be fixed in 7a50eafa8bd5b76065c20a68d2cf4be04639ad7e.