summaryrefslogtreecommitdiffstats
path: root/include/module.h
diff options
context:
space:
mode:
authorQuentin LADEVIE <qladevie@wanadev.fr>2025-04-30 00:17:19 +0200
committerQuentin LADEVIE <qladevie@wanadev.fr>2025-04-30 00:17:19 +0200
commit0ad788465c7505bdadff64c2f3af3ad5edf71cc3 (patch)
tree96bbcf64de7bd2ee7c99ad9a133182ea62a1db0e /include/module.h
parentf8c92cfa9eeb82a608d409cac70d9d2533ab79d8 (diff)
Compiles files one by one
Diffstat (limited to 'include/module.h')
-rw-r--r--include/module.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/module.h b/include/module.h
index 8a1858f..e94e156 100644
--- a/include/module.h
+++ b/include/module.h
@@ -3,17 +3,39 @@
#include <Windows.h>
#include "types.h"
+#include "hashmap.h"
struct module {
void* base_addr;
+ u8** functions_name;
+ u32* functions_start;
+ u32* functions_end;
+ u32* functions_unwind;
+ u32 functions_count;
+ u32 functions_capacity;
+ // u32 functions_name_capacity;
+ // u32 function_start_capacity;
+ // u32 function_end_capacity;
+ // u32 function_unwind_capacity;
+
IMAGE_DOS_HEADER dos_header;
IMAGE_NT_HEADERS64 nt_header;
+#ifdef HASHMAP
+ struct hashmap symbols;
+#endif
u8 name[256U];
};
+
extern struct module modules[64U];
extern u64 modules_list;
extern u8 add_module();
extern void remove_module(u8 index);
+
+#ifdef HASHMAP
+extern struct element* find_function(struct module* module, u32 rip_offset);
+#else
+extern u32 find_function(struct module* module, u64 rip_offset);
+#endif // HASHMAP