delete comments
parent
54458e8b7c
commit
0da1e5fcbc
|
@ -9,22 +9,15 @@ typedef unsigned char byte;
|
||||||
byte* AF_address(byte* f) {
|
byte* AF_address(byte* f) {
|
||||||
byte* real_address = NULL;
|
byte* real_address = NULL;
|
||||||
#ifdef _MSC_VER // MSVC
|
#ifdef _MSC_VER // MSVC
|
||||||
//printf("MSVC Compiler Detected\n");
|
|
||||||
#ifdef NDEBUG // MSVC release mode
|
#ifdef NDEBUG // MSVC release mode
|
||||||
real_address = f;
|
real_address = f;
|
||||||
//printf("FUNCTION ADDRESS: %p\n", real_address);
|
|
||||||
#else // MSVC debug mode
|
#else // MSVC debug mode
|
||||||
byte* f_p = f;
|
byte* f_p = f;
|
||||||
byte* offset = (byte*)(*((int*)f_p) >> 8);
|
byte* offset = (byte*)(*((int*)f_p) >> 8);
|
||||||
real_address = f_p + (int)offset + 5;
|
real_address = f_p + (int)offset + 5;
|
||||||
//printf("TABLE ADDRESS: %p\n", f_p);
|
|
||||||
//printf("OFFSET: %p\n", offset);
|
|
||||||
//printf("REAL ADDRESS: %p\n", real_address);
|
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__GNUC__) // GCC
|
#elif defined(__GNUC__) // GCC
|
||||||
//printf("GCC Compiler Detected\n");
|
|
||||||
real_address = f;
|
real_address = f;
|
||||||
//printf("FUNCTION ADDRESS: %p\n", real_address);
|
|
||||||
#endif
|
#endif
|
||||||
return real_address;
|
return real_address;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue