summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authornavewindre <nw@moneybot.cc>2024-07-12 05:40:41 +0200
committernavewindre <nw@moneybot.cc>2024-07-12 05:40:41 +0200
commit28f41cf689def99fb586bfca47b7e1786227a5a2 (patch)
tree4a843c7785035ca548625ccf988ac924b8815f85 /src/util.h
parent2ebf959ec02048c15323e1bbfc63faedcf5067b6 (diff)
base shit
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index c46ff72..705a778 100644
--- a/src/util.h
+++ b/src/util.h
@@ -19,6 +19,8 @@ extern ULONG u_thread_create( LPTHREAD_START_ROUTINE routine, void* param = 0 );
extern ULONG u_thread_create( HANDLE proc, LPTHREAD_START_ROUTINE routine, void* param = 0 );
extern void u_sleep( U64 ns );
+extern void u_bin_dump( void* data, U64 size, U32 stride = 8 );
+
template < U32 size >
struct STR {
STR() = default;
@@ -111,8 +113,8 @@ inline U8 u_set_debug_privilege() {
return 1;
}
-inline U8 u_binary_match( U8* code, U8* pattern, U32 size ) {
- for( U32 i = 0; i < size; ++i ) {
+inline U8 u_binary_match( U8* code, U8* pattern, U64 size ) {
+ for( U64 i = 0; i < size; ++i ) {
if( pattern[i] && (code[i] ^ pattern[i]) != 0 )
return 0;
}