//
// std::__ndk1::ios_base::pword from 0x95c61c to 0x95c6b0 (148 bytes)
//
// 0 xrefs:
//
// 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:05:34 +0000
//
int *__fastcall std::ios_base::pword(std::ios_base *this, int a2)
{
unsigned int v4; // r9
int v5; // r4
unsigned int v6; // r1
char *v7; // r5
char *v8; // r0
unsigned int *v9; // r12
char *v10; // r3
int *result; // r0
v4 = a2 + 1;
if ( (unsigned int)(a2 + 1) <= *((_DWORD *)this + 17) )
{
v7 = (char *)this + 64;
v6 = *((_DWORD *)this + 16);
v8 = *((char **)this + 15);
v9 = (unsigned int *)v7;
}
else
{
if ( v4 > 0x1FFFFFFE )
{
v5 = 0x3FFFFFFF;
}
else
{
v5 = 2 * *((_DWORD *)this + 14);
if ( v5 < v4 )
v5 = a2 + 1;
}
v8 = (char *)realloc(*((void **)this + 15), 4 * v5);
if ( !v8 )
{
std::ios_base::clear(this, *((_DWORD *)this + 4) | 1);
dword_D32E7C = 0;
return &dword_D32E7C;
}
*((_DWORD *)this + 15) = v8;
v9 = (unsigned int *)((char *)this + 64);
v6 = *((_DWORD *)this + 16);
if ( (int)v6 < v5 )
{
v10 = &v8[4 * v6];
do
{
*(_DWORD *)v10 = 0;
v10 += 4;
v8 = *((char **)this + 15);
}
while ( v10 < &v8[4 * v5] );
}
*((_DWORD *)this + 17) = v5;
}
result = (int *)&v8[4 * a2];
if ( v6 < v4 )
v6 = v4;
*v9 = v6;
return result;
}