From 4c8b52fc94c04c4b3d338c2501971ae348f5b3e5 Mon Sep 17 00:00:00 2001 From: navewindre Date: Tue, 16 Jul 2024 07:19:43 +0200 Subject: =?UTF-8?q?=E3=82=84=E3=83=BC=E3=83=BC=E3=83=BC=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cs2/iface.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/cs2/iface.h') diff --git a/src/cs2/iface.h b/src/cs2/iface.h index be2137d..61cd91c 100644 --- a/src/cs2/iface.h +++ b/src/cs2/iface.h @@ -109,3 +109,17 @@ inline VECTOR iface_get_all( PROCESS64* p ) { return entries; } +inline void iface_dump_to_file( PROCESS64* p ) { + VECTOR entries = iface_get_all( p ); + + static STR<9999999> output; + memset( output, 0, sizeof( output.data ) ); + + for( auto& it : entries ) { + U64 off = it.ptr - it.module; + + sprintf( output, "%siface: %s @%s+0x%llx [0x%llx]\n", output.data, it.name.data, it.module_name.data, off, it.ptr ); + } + + u_write_to_file( output.data, "interfaces.txt" ); +} \ No newline at end of file -- cgit v1.2.3