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

Function NewLocalIdentifier

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

* @brief Allocates a new local variable and returns the integer assigned to it * * @param Token * @return int */

Source from the content-addressed store, hash-verified

4454 * @return int
4455 */
4456unsigned long long
4457NewLocalIdentifier(PSCRIPT_ENGINE_TOKEN Token, unsigned int VariableSize)
4458{
4459 PSCRIPT_ENGINE_TOKEN CopiedToken = CopyToken(Token);
4460 unsigned int VariableNumber = ((VariableSize + 8 - 1) & ~(8 - 1)) / 8;
4461 CopiedToken->VariableMemoryIdx = CurrentUserDefinedFunction->LocalVariableNumber;
4462 CurrentUserDefinedFunction->LocalVariableNumber += VariableNumber;
4463 Push(((PSCRIPT_ENGINE_TOKEN_LIST)CurrentUserDefinedFunction->IdTable), CopiedToken);
4464 return CopiedToken->VariableMemoryIdx;
4465}
4466
4467/**
4468 * @brief

Callers 1

CodeGenFunction · 0.85

Calls 2

CopyTokenFunction · 0.85
PushFunction · 0.85

Tested by

no test coverage detected