feat(hook): expand IAT hook coverage with TLS bypass, connect/recv hooks, and logging

Adds connect_hook, connectex_hook, recv_hook, ssl_patch, tls_bypass, lsx, ea_stub,
and origin_spy modules to intercept EA's TLS and socket layers in addition to
getaddrinfo. Adds DLL-level logging to C:\openfut_hook.log for debugging. Also
patches windows-sys feature flags to include Cryptography and Threading APIs needed
by the new hooks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-06-30 10:36:17 -07:00
parent 3b965f1f3f
commit 87241acc1a
13 changed files with 1633 additions and 40 deletions
+10 -1
View File
@@ -39,7 +39,7 @@ struct ImageDataDirectory {
#[repr(C)]
struct ImageOptionalHeader64 {
magic: u16,
_pad: [u8; 106],
_pad: [u8; 110],
data_directory: [ImageDataDirectory; 16],
}
@@ -71,6 +71,15 @@ pub unsafe fn patch_iat(original_fn: *const (), hook_fn: *const ()) -> usize {
patch_module(module, original_fn, hook_fn)
}
/// Patch the IAT of a specific already-loaded DLL (e.g. b"EAWebKit.dll\0").
pub unsafe fn patch_iat_in(module_name: &[u8], original_fn: *const (), hook_fn: *const ()) -> usize {
let module = GetModuleHandleA(module_name.as_ptr());
if module.is_null() {
return 0;
}
patch_module(module, original_fn, hook_fn)
}
unsafe fn patch_module(
module: HMODULE,
original_fn: *const (),