//
// GJMessageThread::createRoleBadge from 0x4aaebc to 0x4aaf42 (134 bytes)
//
// 3 xrefs:
// > GJThreadCell::loadFromThread @ 0x42b0e2
// > ThreadViewPopup::layoutTitleRow @ 0x74d1d2
// > ThreadOptionsPopup::init @ 0x7575c6
//
// 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 11:49:58 +0000
//
int __fastcall GJMessageThread::createRoleBadge(GJMessageThread *this, float a2)
{
int v3; // r2
char *v4; // r0
int v5; // r4
void (__fastcall *v6)(int, _BYTE *); // r7
void (__fastcall *v7)(int, _DWORD); // r6
int v8; // r0
_BYTE v10[8]; // [sp+4h] [bp-10h] BYREF
v3 = *((_DWORD *)this + 48);
if ( (unsigned int)(v3 - 1) > 1 )
return 0;
if ( v3 == 2 )
v4 = "modBadge_02_001.png";
else
v4 = "modBadge_01_001.png";
v5 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v4, (const char *)(v3 - 1));
v6 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v5 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v10, 0.0, 0.5);
v6(v5, v10);
v7 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v5 + 80);
v8 = (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 164))(v5);
v7(v5, a2 / *(float *)(v8 + 4));
return v5;
}