//
// pugi::xpath_variable::set from 0x819124 to 0x81916a (70 bytes)
//
// 1 xrefs:
// > pugi::xpath_variable_set::set @ 0x8193de
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:01:44 +0000
//
int __fastcall pugi::xpath_variable::set(pugi::xpath_variable *this, const char *a2)
{
size_t v5; // r6
void *v6; // r0
void *v7; // r8
int v8; // r0
if ( *(_DWORD *)this != 3 )
return 0;
v5 = strlen(a2) + 1;
v6 = (void *)off_D2006C(v5);
v7 = v6;
if ( !v6 )
return 0;
memcpy(v6, a2, v5);
v8 = *((_DWORD *)this + 2);
if ( v8 )
off_D20070(v8);
*((_DWORD *)this + 2) = v7;
return 1;
}