-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
64 lines (50 loc) · 1.59 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "CryptData.h"
#include <cstdio>
//struct TEST_STRUCT
//{
// CD_DEFINE(void*, Temp);
//
// TEST_STRUCT(void* startval)
// : CD_INIT(Temp, startval)
// { }
//};
struct TEST_STRUCT
{
CD_DEFINE(double, TempDouble);
CD_DEFINE(unsigned long long, TempUll)
TEST_STRUCT(double startd, unsigned long long startull)
: CD_INIT(TempDouble, startd)
, CD_INIT(TempUll, startull)
{ }
};
//unsigned char meme[] = { 0xFF };
//
//__forceinline const float __Name(float value)
//{
// typedef __CD_DATA_STORAGE<4>::Type(*memefn)(__CD_DATA_STORAGE<4>::Type);
//
// //return ((float(*)(__CDDS(float)))(&meme))(__COERCE_TYPE(value));
// return ((float(*)(__CDDS(float)))(&meme))(__COERCE_TYPE(meme));
//}
int main()
{
//constexpr auto meme = __CD_CRYPT_SHELLCODE<1776, int>::Data;
//auto Ts = new TEST_STRUCT((void*)0x1000231);
////Ts->SetTemp((void*)0x1992);
//printf("Temp: %p\n", Ts->GetTemp());
//printf("crypted: %p\n", Ts->__Cd_np_Temp);
//Ts->SetTemp((void*)0x1776);
//printf("Temp: %p\n", Ts->GetTemp());
//printf("crypted: %p\n", Ts->__Cd_np_Temp);
auto Ts = new TEST_STRUCT(1.2, 1776);
printf("Temp: %.3f\n", Ts->GetTempDouble());
printf("crypted: %.3f\n", Ts->__Cd_np_TempDouble);
Ts->SetTempDouble(1.52312);
printf("Temp: %.3f\n", Ts->GetTempDouble());
printf("crypted: %.3f\n\n", Ts->__Cd_np_TempDouble);
printf("Temp: %llu\n", Ts->GetTempUll());
printf("crypted: %llu\n", Ts->__Cd_np_TempUll);
Ts->SetTempUll(1992);
printf("Temp: %llu\n", Ts->GetTempUll());
printf("crypted: %llu\n", Ts->__Cd_np_TempUll);
}