HyperDbg Debugger
Loading...
Searching...
No Matches
script-engine.h
Go to the documentation of this file.
1
12
13#pragma once
14#include "type.h"
15
16#ifndef SCRIPT_ENGINE_H
17# define SCRIPT_ENGINE_H
18
19
20VOID
21ShowMessages(const char * Fmt, ...);
22
24NewSymbol(void);
25
28
31
32unsigned int
34
35void
36RemoveSymbol(PSYMBOL * Symbol);
37
39NewSymbolBuffer(void);
40
42PushSymbol(PSYMBOL_BUFFER SymbolBuffer, const PSYMBOL Symbol);
43
46
47void
49 UINT64 BooleanExpressionSize,
50 PSCRIPT_ENGINE_TOKEN FirstToken,
51 PSCRIPT_ENGINE_TOKEN_LIST MatchedStack,
52 PSYMBOL_BUFFER CodeBuffer,
53 char * str,
54 char * c,
56
57UINT64
58BooleanExpressionExtractEnd(char * str, BOOL * WaitForWaitStatementBooleanExpression, PSCRIPT_ENGINE_TOKEN CurrentIn);
59
60void
62 PSCRIPT_ENGINE_TOKEN_LIST MatchedStack,
63 PSYMBOL_BUFFER CodeBuffer,
64 PSCRIPT_ENGINE_TOKEN Operator,
66 char** ScriptSource
67 );
68
69unsigned long long int
70RegisterToInt(char * str);
71
72unsigned long long int
73PseudoRegToInt(char * str);
74
75unsigned long long int
76SemanticRuleToInt(char * str);
77
78char *
79HandleError(PSCRIPT_ENGINE_ERROR_TYPE Error, char * str);
80
81int
83
84int
86
87VOID
89
92
93unsigned long long
94NewLocalIdentifier(PSCRIPT_ENGINE_TOKEN PTOKEN, unsigned int VariableSize);
95
96int
98
99VOID
101
104
105int
107
108int
110
111int
112LalrGetRhsSize(int RuleId);
113
114BOOL
116
119
121FuncGetNumberOfOperands(UINT64 FuncType, UINT32 * NumberOfGetOperands, UINT32 * NumberOfSetOperands);
122
123#endif
int BOOL
Definition BasicTypes.h:25
UCHAR BOOLEAN
Definition BasicTypes.h:35
unsigned int UINT32
Definition BasicTypes.h:54
struct SYMBOL * PSYMBOL
struct SYMBOL_BUFFER * PSYMBOL_BUFFER
struct _SCRIPT_ENGINE_TOKEN * PSCRIPT_ENGINE_TOKEN
struct _SCRIPT_ENGINE_TOKEN_LIST * PSCRIPT_ENGINE_TOKEN_LIST
struct _USER_DEFINED_FUNCTION_NODE * PUSER_DEFINED_FUNCTION_NODE
int LalrGetRhsSize(int RuleId)
Returns the size of Right Hand Side (RHS) of a rule.
Definition script-engine.c:4571
PUSER_DEFINED_FUNCTION_NODE GetUserDefinedFunctionNode(PSCRIPT_ENGINE_TOKEN Token)
Definition script-engine.c:4549
int GetLocalIdentifierVal(PSCRIPT_ENGINE_TOKEN PTOKEN)
Returns the integer assigned to local variable.
Definition script-engine.c:4383
VARIABLE_TYPE * GetLocalIdentifierVariableType(PSCRIPT_ENGINE_TOKEN Token)
Definition script-engine.c:4493
BOOLEAN FuncGetNumberOfOperands(UINT64 FuncType, UINT32 *NumberOfGetOperands, UINT32 *NumberOfSetOperands)
Script Engine get number of operands.
Definition script-engine.c:4688
VOID SetLocalIdentifierVariableType(PSCRIPT_ENGINE_TOKEN Token, VARIABLE_TYPE *VariableType)
Definition script-engine.c:4473
VOID ShowMessages(const char *Fmt,...)
Show messages.
Definition messaging.cpp:84
unsigned long long int RegisterToInt(char *str)
Converts register string to integer.
Definition script-engine.c:4112
int NewFunctionParameterIdentifier(PSCRIPT_ENGINE_TOKEN Token)
Definition script-engine.c:4514
int NewGlobalIdentifier(PSCRIPT_ENGINE_TOKEN PTOKEN)
Allocates a new global variable and returns the integer assigned to it.
Definition script-engine.c:4404
PSYMBOL_BUFFER PushSymbol(PSYMBOL_BUFFER SymbolBuffer, const PSYMBOL Symbol)
Gets a symbol and push it into the symbol buffer.
Definition script-engine.c:3966
PSYMBOL NewStringSymbol(PSCRIPT_ENGINE_TOKEN Token)
Allocates a new SYMBOL with string type and returns the reference to it.
Definition script-engine.c:3692
unsigned long long int SemanticRuleToInt(char *str)
Converts a sematinc rule token to integer.
Definition script-engine.c:4232
unsigned long long NewLocalIdentifier(PSCRIPT_ENGINE_TOKEN PTOKEN, unsigned int VariableSize)
Allocates a new local variable and returns the integer assigned to it.
Definition script-engine.c:4457
VARIABLE_TYPE * GetGlobalIdentifierVariableType(PSCRIPT_ENGINE_TOKEN Token)
Definition script-engine.c:4436
PSYMBOL NewSymbol(void)
Allocates a new SYMBOL and returns the reference to it.
Definition script-engine.c:3666
UINT64 BooleanExpressionExtractEnd(char *str, BOOL *WaitForWaitStatementBooleanExpression, PSCRIPT_ENGINE_TOKEN CurrentIn)
Computes the boolean expression length starting from the current input position.
Definition script-engine.c:3439
unsigned long long int PseudoRegToInt(char *str)
Converts pseudo register string to integer.
Definition script-engine.c:4213
BOOL LalrIsOperandType(PSCRIPT_ENGINE_TOKEN PTOKEN)
Returns TRUE if the Token can be the operand of an operator.
Definition script-engine.c:4592
PSYMBOL NewWstringSymbol(PSCRIPT_ENGINE_TOKEN Token)
Allocates a new SYMBOL with wstring type and returns the reference to it.
Definition script-engine.c:3719
int GetFunctionParameterIdentifier(PSCRIPT_ENGINE_TOKEN Token)
Definition script-engine.c:4528
VOID SetGlobalIdentifierVariableType(PSCRIPT_ENGINE_TOKEN Token, VARIABLE_TYPE *VariableType)
Definition script-engine.c:4417
void ScriptEngineBooleanExpresssionParse(UINT64 BooleanExpressionSize, PSCRIPT_ENGINE_TOKEN FirstToken, PSCRIPT_ENGINE_TOKEN_LIST MatchedStack, PSYMBOL_BUFFER CodeBuffer, char *str, char *c, PSCRIPT_ENGINE_ERROR_TYPE Error)
LALR parser used for parsing boolean expression.
Definition script-engine.c:3490
unsigned int GetSymbolHeapSize(PSYMBOL Symbol)
Returns the number of SYMBOL objects (24 bytes) allocated by string or wstring sybmol.
Definition script-engine.c:3752
void RemoveSymbol(PSYMBOL *Symbol)
Frees the memory allocate by this Symbol.
Definition script-engine.c:3764
PSYMBOL_BUFFER NewSymbolBuffer(void)
allocates a new Symbol Buffer and returns the reference to it
Definition script-engine.c:3923
char * HandleError(PSCRIPT_ENGINE_ERROR_TYPE Error, char *str)
Prints some information about the error.
Definition script-engine.c:4252
int GetGlobalIdentifierVal(PSCRIPT_ENGINE_TOKEN PTOKEN)
Returns the integer assigned to global variable.
Definition script-engine.c:4362
void CodeGen(PSCRIPT_ENGINE_TOKEN_LIST MatchedStack, PSYMBOL_BUFFER CodeBuffer, PSCRIPT_ENGINE_TOKEN Operator, PSCRIPT_ENGINE_ERROR_TYPE Error, char **ScriptSource)
Script Engine code generator.
Definition script-engine.c:709
PSYMBOL ToSymbol(PSCRIPT_ENGINE_TOKEN PTOKEN, PSCRIPT_ENGINE_ERROR_TYPE Error)
Converts Token to Symbol and returns the reference to it.
Definition script-engine.c:3815
Variable type definitions for the script engine.
enum _SCRIPT_ENGINE_ERROR_TYPE * PSCRIPT_ENGINE_ERROR_TYPE
struct _VARIABLE_TYPE VARIABLE_TYPE