MCPcopy Create free account
hub / github.com/HyperDbg/HyperDbg / GetLocalIdentifierVal

Function GetLocalIdentifierVal

hyperdbg/script-engine/code/script-engine.c:4382–4395  ·  view source on GitHub ↗

* @brief Returns the integer assigned to local variable * * @param Token * @return int */

Source from the content-addressed store, hash-verified

4380 * @return int
4381 */
4382int
4383GetLocalIdentifierVal(PSCRIPT_ENGINE_TOKEN Token)
4384{
4385 PSCRIPT_ENGINE_TOKEN CurrentToken;
4386 for (uintptr_t i = 0; i < ((PSCRIPT_ENGINE_TOKEN_LIST)CurrentUserDefinedFunction->IdTable)->Pointer; i++)
4387 {
4388 CurrentToken = *(((PSCRIPT_ENGINE_TOKEN_LIST)CurrentUserDefinedFunction->IdTable)->Head + i);
4389 if (!strcmp(Token->Value, CurrentToken->Value))
4390 {
4391 return (int)CurrentToken->VariableMemoryIdx;
4392 }
4393 }
4394 return -1;
4395}
4396
4397/**
4398 * @brief Allocates a new global variable and returns the integer assigned to it

Callers 2

GetTokenFunction · 0.85
ToSymbolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected