{"type": "func", "start": 4297912892, "end": 4297913244, "name": "CreateParticlePopup::onSelectParticleTexture", "pseudocode": "// \n// CreateParticlePopup::onSelectParticleTexture from 0x1002cf23c to 0x1002cf39c (352 bytes)\n// \n// 1 xrefs:\n// > CreateParticlePopup::init @ 0x1002cd57c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall CreateParticlePopup::onSelectParticleTexture(CreateParticlePopup *a1, cocos2d::CCObject *a2)\n{\n  int v4; // w0\n  cocos2d::CCParticleSystemQuad *m_particle; // x21\n  cocos2d::CCSpriteFrameCache *v6; // x22\n  cocos2d::CCString *v7; // x0\n  const char *CString; // x0\n  cocos2d::CCSpriteFrame *v9; // x0\n  cocos2d::CCSprite *m_selectSprite; // x20\n  cocos2d::CCNode *v11; // x21\n  cocos2d::CCNode *v12; // x22\n  const cocos2d::CCPoint *v13; // x0\n  cocos2d::CCPoint v14; // [xsp+10h] [xbp-30h] BYREF\n  _BYTE v15[8]; // [xsp+18h] [xbp-28h] BYREF\n  cocos2d::CCPoint v16; // 0:kr08_8.8\n\n  if ( ((int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) < 1\n    || ((int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) <= 212 )\n  {\n    if ( ((int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) < 1 )\n      v4 = 0;\n    else\n      v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  }\n  else\n  {\n    v4 = 212;\n  }\n  a1->m_particleIndex = v4;\n  m_particle = a1->m_particle;\n  v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n  v7 = (cocos2d::CCString *)sub_100268F4C(\"particle_%02d_001.png\", a1->m_particleIndex);\n  CString = cocos2d::CCString::getCString(v7);\n  v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, CString);\n  cocos2d::CCParticleSystemQuad::setDisplayFrame(m_particle, v9);\n  CreateParticlePopup::updateParticleValueForType(a1, (float)a1->m_particleIndex, ParticleIdx, nullptr);\n  m_selectSprite = a1->m_selectSprite;\n  v11 = (cocos2d::CCNode *)((__int64 (__fastcall *)(cocos2d::CCSprite *))m_selectSprite->getParent)(m_selectSprite);\n  v12 = (cocos2d::CCNode *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[6].~CCObject_0)(a2);\n  v13 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[2].acceptVisitor)(a2);\n  cocos2d::CCNode::convertToWorldSpace(v12, v13);\n  v16 = cocos2d::CCNode::convertToNodeSpace(v11, &v14);\n  ((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *, float, float))m_selectSprite->setPosition)(\n    m_selectSprite,\n    v15,\n    v16.x,\n    v16.y);\n}", "assembly": "; \n; CreateParticlePopup::onSelectParticleTexture from 0x1002cf23c to 0x1002cf39c (352 bytes)\n; \n; 1 xrefs:\n; > CreateParticlePopup::init @ 0x1002cd57c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x50                                          ; +0x0, 0x1002cf23c\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x4, 0x1002cf240\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x1002cf244\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x1002cf248\nADD             X29, SP, #0x40                                         ; +0x10, 0x1002cf24c\nMOV             X19, X1                                                ; +0x14, 0x1002cf250\nMOV             X20, X0                                                ; +0x18, 0x1002cf254\nLDR             X8, [X1]                                               ; +0x1c, 0x1002cf258\nLDR             X8, [X8,#0x40]                                         ; +0x20, 0x1002cf25c\nMOV             X0, X1                                                 ; +0x24, 0x1002cf260\nBLR             X8                                                     ; +0x28, 0x1002cf264\nCMP             W0, #1                                                 ; +0x2c, 0x1002cf268\nB.LT            loc_1002CF290                                          ; +0x30, 0x1002cf26c\nLDR             X8, [X19]                                              ; +0x34, 0x1002cf270\nLDR             X8, [X8,#0x40]                                         ; +0x38, 0x1002cf274\nMOV             X0, X19                                                ; +0x3c, 0x1002cf278\nBLR             X8                                                     ; +0x40, 0x1002cf27c\nCMP             W0, #0xD4                                              ; +0x44, 0x1002cf280\nB.LE            loc_1002CF290                                          ; +0x48, 0x1002cf284\nMOV             W0, #0xD4                                              ; +0x4c, 0x1002cf288\nB               loc_1002CF2C0                                          ; +0x50, 0x1002cf28c\nLDR             X8, [X19]                                              ; +0x54, 0x1002cf290\nLDR             X8, [X8,#0x40]                                         ; +0x58, 0x1002cf294\nMOV             X0, X19                                                ; +0x5c, 0x1002cf298\nBLR             X8                                                     ; +0x60, 0x1002cf29c\nCMP             W0, #1                                                 ; +0x64, 0x1002cf2a0\nB.LT            loc_1002CF2BC                                          ; +0x68, 0x1002cf2a4\nLDR             X8, [X19]                                              ; +0x6c, 0x1002cf2a8\nLDR             X8, [X8,#0x40]                                         ; +0x70, 0x1002cf2ac\nMOV             X0, X19                                                ; +0x74, 0x1002cf2b0\nBLR             X8                                                     ; +0x78, 0x1002cf2b4\nB               loc_1002CF2C0                                          ; +0x7c, 0x1002cf2b8\nMOV             W0, #0                                                 ; +0x80, 0x1002cf2bc\nSTR             W0, [X20,#0x3A0]                                       ; +0x84, 0x1002cf2c0\nLDR             X21, [X20,#0x2B0]                                      ; +0x88, 0x1002cf2c4\nBL              cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache    ; +0x8c, 0x1002cf2c8\nMOV             X22, X0                                                ; +0x90, 0x1002cf2cc\nLDR             W8, [X20,#0x3A0]                                       ; +0x94, 0x1002cf2d0\nSTR             X8, [SP,#0x40+var_40]                                  ; +0x98, 0x1002cf2d4\nADRL            X0, aParticle02d001; \"particle_%02d_001.png\"           ; +0x9c, 0x1002cf2d8\nBL              sub_100268F4C                                          ; +0xa4, 0x1002cf2e0\nBL              cocos2d__CCString__getCString                          ; +0xa8, 0x1002cf2e4\nMOV             X1, X0                                                 ; +0xac, 0x1002cf2e8\nMOV             X0, X22                                                ; +0xb0, 0x1002cf2ec\nBL              cocos2d__CCSpriteFrameCache__spriteFrameByName         ; +0xb4, 0x1002cf2f0\nMOV             X1, X0                                                 ; +0xb8, 0x1002cf2f4\nMOV             X0, X21                                                ; +0xbc, 0x1002cf2f8\nBL              cocos2d__CCParticleSystemQuad__setDisplayFrame         ; +0xc0, 0x1002cf2fc\nLDR             S0, [X20,#0x3A0]                                       ; +0xc4, 0x1002cf300\nSCVTF           S0, S0                                                 ; +0xc8, 0x1002cf304\nMOV             X0, X20                                                ; +0xcc, 0x1002cf308\nMOV             W1, #0x3F ; '?'                                        ; +0xd0, 0x1002cf30c\nMOV             X2, #0                                                 ; +0xd4, 0x1002cf310\nBL              CreateParticlePopup__updateParticleValueForType        ; +0xd8, 0x1002cf314\nLDR             X20, [X20,#0x360]                                      ; +0xdc, 0x1002cf318\nLDR             X8, [X20]                                              ; +0xe0, 0x1002cf31c\nLDR             X8, [X8,#0x1F0]                                        ; +0xe4, 0x1002cf320\nMOV             X0, X20                                                ; +0xe8, 0x1002cf324\nBLR             X8                                                     ; +0xec, 0x1002cf328\nMOV             X21, X0                                                ; +0xf0, 0x1002cf32c\nLDR             X8, [X19]                                              ; +0xf4, 0x1002cf330\nLDR             X8, [X8,#0x1F0]                                        ; +0xf8, 0x1002cf334\nMOV             X0, X19                                                ; +0xfc, 0x1002cf338\nBLR             X8                                                     ; +0x100, 0x1002cf33c\nMOV             X22, X0                                                ; +0x104, 0x1002cf340\nLDR             X8, [X19]                                              ; +0x108, 0x1002cf344\nLDR             X8, [X8,#0xC0]                                         ; +0x10c, 0x1002cf348\nMOV             X0, X19                                                ; +0x110, 0x1002cf34c\nBLR             X8                                                     ; +0x114, 0x1002cf350\nMOV             X1, X0                                                 ; +0x118, 0x1002cf354\nADD             X8, SP, #0x40+var_30                                   ; +0x11c, 0x1002cf358\nMOV             X0, X22                                                ; +0x120, 0x1002cf35c\nBL              cocos2d__CCNode__convertToWorldSpace                   ; +0x124, 0x1002cf360\nADD             X8, SP, #0x40+var_28                                   ; +0x128, 0x1002cf364\nADD             X1, SP, #0x40+var_30                                   ; +0x12c, 0x1002cf368\nMOV             X0, X21                                                ; +0x130, 0x1002cf36c\nBL              cocos2d__CCNode__convertToNodeSpace                    ; +0x134, 0x1002cf370\nLDR             X8, [X20]                                              ; +0x138, 0x1002cf374\nLDR             X8, [X8,#0xB8]                                         ; +0x13c, 0x1002cf378\nADD             X1, SP, #0x40+var_28                                   ; +0x140, 0x1002cf37c\nMOV             X0, X20                                                ; +0x144, 0x1002cf380\nBLR             X8                                                     ; +0x148, 0x1002cf384\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x14c, 0x1002cf388\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x150, 0x1002cf38c\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x154, 0x1002cf390\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x158, 0x1002cf394\nRET                                                                    ; +0x15c, 0x1002cf398", "xrefs": ["CreateParticlePopup::init @ 0x1002cd57c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}