File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ void ExpressionFunctions::Init()
82
82
RegisterEasy (" mem.base" , membase);
83
83
RegisterEasy (" mem.size" , memsize);
84
84
RegisterEasy (" mem.iscode" , memiscode);
85
+ RegisterEasy (" mem.isstring" , memisstring);
85
86
RegisterEasy (" mem.decodepointer" , memdecodepointer);
86
87
87
88
// Disassembly
Original file line number Diff line number Diff line change @@ -122,6 +122,16 @@ namespace Exprfunc
122
122
return MemIsCodePage (addr, false );
123
123
}
124
124
125
+ duint memisstring (duint addr)
126
+ {
127
+ STRING_TYPE strType;
128
+ disasmispossiblestring (addr, &strType);
129
+ if (strType != STRING_TYPE::str_none)
130
+ return strType == STRING_TYPE::str_unicode ? 2 : 1 ;
131
+ else
132
+ return 0 ;
133
+ }
134
+
125
135
duint memdecodepointer (duint ptr)
126
136
{
127
137
auto decoded = ptr;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ namespace Exprfunc
27
27
duint membase (duint addr);
28
28
duint memsize (duint addr);
29
29
duint memiscode (duint addr);
30
+ duint memisstring (duint addr);
30
31
duint memdecodepointer (duint ptr);
31
32
32
33
duint dislen (duint addr);
You can’t perform that action at this time.
0 commit comments