//
// CurrencySprite::createWithSprite from 0x14013ec10 to 0x14013ede8 (472 bytes)
//
// 2 xrefs:
// > CurrencyRewardLayer::createObjectsFull @ 0x14013c227
// > ??> @ 0x1409172c4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:27:08 +0000
//
bool __fastcall CurrencySprite::createWithSprite(cocos2d::CCNode **a1, __int64 a2)
{
bool result; // al
cocos2d::CCObject *v5; // rax
float v6; // xmm6_4
struct cocos2d::CCActionInterval *v7; // rax
struct cocos2d::CCAction *v8; // rax
void (__fastcall ***v9)(_QWORD, __int16 *); // rcx
cocos2d::CCNode *v10; // rdi
__int64 v11; // rbx
__int64 v12; // rax
void (__fastcall **v13)(__int64, __int16 *); // rax
struct cocos2d::CCActionInterval *v14; // rax
struct cocos2d::CCAction *v15; // rax
__int16 v16; // [rsp+50h] [rbp+18h] BYREF
char v17; // [rsp+52h] [rbp+1Ah]
result = cocos2d::CCSprite::init((cocos2d::CCSprite *)a1);
if ( result )
{
(*((void (__fastcall **)(cocos2d::CCNode **, __int64))*a1 + 58))(a1, a2);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a2 + 184LL))(a2, &unk_14090A3A8);
v5 = cocos2d::CCSprite::createWithSpriteFrameName("shineBurst_001.png");
a1[84] = v5;
cocos2d::CCObject::retain(v5);
if ( (float)((float)rand() / 32767.0) <= 0.5 )
v6 = -1.0;
else
v6 = 1.0;
v7 = cocos2d::CCRotateBy::create(1.0, v6 * 90.0);
v8 = cocos2d::CCRepeatForever::create(v7);
cocos2d::CCNode::runAction(a1[84], v8);
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)a1[84] + 160LL))(a1[84]);
v9 = (void (__fastcall ***)(_QWORD, __int16 *))((char *)a1[84] + 320);
v16 = -1;
v17 = -1;
(**v9)(v9, &v16);
v10 = cocos2d::CCSprite::createWithSpriteFrameName("shineBurst_001.png");
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCNode *))(*(_QWORD *)a1[84] + 464LL))(a1[84], v10);
v11 = *(_QWORD *)v10;
cocos2d::CCNode::convertToNodeSpace(a1[84], &v16, &unk_14090A3A8);
(*(void (__fastcall **)(cocos2d::CCNode *, __int64))(v11 + 184))(v10, v12);
(*(void (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v10 + 160LL))(v10);
v16 = -1;
v13 = *((void (__fastcall ***)(__int64, __int16 *))v10 + 40);
v17 = -1;
(*v13)((__int64)v10 + 320, &v16);
v14 = cocos2d::CCRotateBy::create(1.0, (float)-v6 * 180.0);
v15 = cocos2d::CCRepeatForever::create(v14);
cocos2d::CCNode::runAction(v10, v15);
return 1;
}
return result;
}