//
// cocos2d::CCActionTween::initWithDuration from 0x7c2c38 to 0x7c2d0c (212 bytes)
//
// 1 xrefs:
// > cocos2d::CCActionTween::create @ 0x7c2d54
//
// 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:00:21 +0000
//
int __fastcall cocos2d::CCActionTween::initWithDuration(
cocos2d::CCActionTween *this,
float a2,
const char *a3,
float a4,
float a5)
{
int v7; // r9
unsigned int v8; // r0
size_t v9; // r5
char *v10; // r7
unsigned int v11; // r10
unsigned int v12; // r3
unsigned int v13; // r3
unsigned int v14; // r4
_BYTE *v15; // r0
_BYTE *v16; // r11
v7 = cocos2d::CCActionInterval::initWithDuration(this, a2);
if ( v7 )
{
v8 = strlen(a3);
v9 = v8;
if ( (*((_BYTE *)this + 80) & 1) != 0 )
{
v10 = *((char **)this + 22);
v11 = (*((_DWORD *)this + 20) & 0xFFFFFFFE) - 1;
if ( v11 >= v8 )
{
LABEL_4:
if ( v8 )
memmove(v10, a3, v8);
v10[v9] = 0;
if ( (*((_BYTE *)this + 80) & 1) != 0 )
*((_DWORD *)this + 21) = v9;
else
*((_BYTE *)this + 80) = 2 * v9;
LABEL_20:
*((float *)this + 24) = a4;
*((float *)this + 25) = a5;
*((_DWORD *)this + 23) = 0;
return v7;
}
if ( v11 > 0x7FFFFFE6 )
{
v13 = -18;
LABEL_15:
v14 = v13 + 1;
v15 = (_BYTE *)operator new(v13 + 1);
v16 = v15;
if ( v9 )
memcpy(v15, a3, v9);
if ( v11 != 10 )
operator delete(v10);
*((_DWORD *)this + 22) = v16;
*((_DWORD *)this + 21) = v9;
*((_DWORD *)this + 20) = v14 | 1;
v16[v9] = 0;
goto LABEL_20;
}
}
else
{
v10 = (char *)this + 81;
if ( v8 <= 0xA )
goto LABEL_4;
v11 = 10;
}
v12 = 2 * v11;
if ( 2 * v11 < v8 )
v12 = v8;
if ( v12 <= 0xA )
v13 = 10;
else
v13 = ((v12 + 16) & 0xFFFFFFF0) - 1;
goto LABEL_15;
}
return v7;
}