{"type": "func", "start": 5373558832, "end": 5373559337, "name": "ParticleGameObject::claimParticle", "pseudocode": "// \n// ParticleGameObject::claimParticle from 0x1404a0030 to 0x1404a0229 (505 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x14060d8d0\n// > <???> @ 0x1406dc4dc\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\n// Hidden C++ exception states: #wind=2\nvoid ParticleGameObject::claimParticle(ParticleGameObject *a1)\n{\n  __int64 v2; // rax\n  cocos2d::CCParticleSystemQuad *v3; // rax\n  ParticleGameObject_vtbl *v4; // rbx\n  const cocos2d::CCPoint *v5; // rax\n  cocos2d::CCParticleSystemQuad *m_particle; // rcx\n  float v7; // xmm0_4\n  void *v8; // [rsp+50h] [rbp+8h]\n  void *v9; // [rsp+50h] [rbp+8h]\n\n  if ( !a1->m_particle && !a1->m_notPreviewing )\n  {\n    if ( a1->m_updatedParticleData )\n    {\n      a1->m_updatedParticleData = 0;\n      GameToolbox::particleStringToStruct(\n        (__int64 *)&a1->m_particleData.m_data.m_bigStorage,\n        (__int64)&a1->m_particleStruct);\n    }\n    v2 = qword_1406C2ED8;\n    if ( a1->m_editorEnabled )\n    {\n      if ( !qword_1406C2ED8 )\n      {\n        v8 = operator new(0x668u);\n        qword_1406C2ED8 = sub_14017AB00((__int64)v8);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n        v2 = qword_1406C2ED8;\n      }\n      v3 = (cocos2d::CCParticleSystemQuad *)(*(__int64 (__fastcall **)(_QWORD, std::string *, cocos2d::ParticleStruct *))(**(_QWORD **)(v2 + 528) + 1304LL))(\n                                              *(_QWORD *)(v2 + 528),\n                                              &a1->m_particleData,\n                                              &a1->m_particleStruct);\n    }\n    else\n    {\n      if ( !qword_1406C2ED8 )\n      {\n        v9 = operator new(0x668u);\n        qword_1406C2ED8 = sub_14017AB00((__int64)v9);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n        v2 = qword_1406C2ED8;\n      }\n      v3 = (cocos2d::CCParticleSystemQuad *)(*(__int64 (__fastcall **)(_QWORD, std::string *, cocos2d::ParticleStruct *))(**(_QWORD **)(v2 + 520) + 1304LL))(\n                                              *(_QWORD *)(v2 + 520),\n                                              &a1->m_particleData,\n                                              &a1->m_particleStruct);\n    }\n    a1->m_particle = v3;\n    v4 = a1->EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    v5 = a1->getPosition_0(a1);\n    v4->setPosition_0(a1, v5);\n    m_particle = a1->m_particle;\n    if ( m_particle )\n    {\n      v7 = m_particle->getDuration(m_particle);\n      a1->m_hasCustomAnimation = v7 >= 0.0;\n      if ( v7 >= 0.0 )\n      {\n        cocos2d::CCParticleSystem::stopSystem(a1->m_particle);\n        a1->m_startingRespawn = 1;\n        a1->m_respawnResult = -1.0;\n      }\n      ParticleGameObject::applyParticleSettings(a1, a1->m_particle);\n    }\n  }\n}", "assembly": "; \n; ParticleGameObject::claimParticle from 0x1404a0030 to 0x1404a0229 (505 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x14060d8d0\n; > <???> @ 0x1406dc4dc\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1404a0030\npush    rdi                                                            ; +0x5, 0x1404a0035\nsub     rsp, 40h                                                       ; +0x6, 0x1404a0036\nmov     rdi, rcx                                                       ; +0xa, 0x1404a003a\ncmp     qword ptr [rcx+308h], 0                                        ; +0xd, 0x1404a003d\njnz     loc_1404A021E                                                  ; +0x15, 0x1404a0045\ncmp     byte ptr [rcx+719h], 0                                         ; +0x1b, 0x1404a004b\njnz     loc_1404A021E                                                  ; +0x22, 0x1404a0052\ncmp     byte ptr [rcx+5D8h], 0                                         ; +0x28, 0x1404a0058\njz      short loc_1404A007B                                            ; +0x2f, 0x1404a005f\nmov     byte ptr [rcx+5D8h], 0                                         ; +0x31, 0x1404a0061\nlea     rdx, [rcx+5E0h]                                                ; +0x38, 0x1404a0068\nadd     rcx, 5B8h                                                      ; +0x3f, 0x1404a006f\ncall    GameToolbox__particleStringToStruct                            ; +0x46, 0x1404a0076\nmov     rax, cs:qword_1406C2ED8                                        ; +0x4b, 0x1404a007b\ncmp     byte ptr [rdi+28Dh], 0                                         ; +0x52, 0x1404a0082\njz      loc_1404A011D                                                  ; +0x59, 0x1404a0089\ntest    rax, rax                                                       ; +0x5f, 0x1404a008f\njnz     short loc_1404A00C3                                            ; +0x62, 0x1404a0092\nmov     ecx, 668h; Size                                                ; +0x64, 0x1404a0094\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x69, 0x1404a0099\nmov     [rsp+48h+arg_0], rax                                           ; +0x6e, 0x1404a009e\nmov     rcx, rax                                                       ; +0x73, 0x1404a00a3\ncall    sub_14017AB00                                                  ; +0x76, 0x1404a00a6\nnop                                                                    ; +0x7b, 0x1404a00ab\nmov     cs:qword_1406C2ED8, rax                                        ; +0x7c, 0x1404a00ac\nmov     rdx, [rax]                                                     ; +0x83, 0x1404a00b3\nmov     rcx, rax                                                       ; +0x86, 0x1404a00b6\ncall    qword ptr [rdx+48h]                                            ; +0x89, 0x1404a00b9\nmov     rax, cs:qword_1406C2ED8                                        ; +0x8c, 0x1404a00bc\nmov     r10, [rax+210h]                                                ; +0x93, 0x1404a00c3\nmov     ecx, [rdi+470h]                                                ; +0x9a, 0x1404a00ca\ntest    ecx, ecx                                                       ; +0xa0, 0x1404a00d0\njnz     short loc_1404A00DA                                            ; +0xa2, 0x1404a00d2\nmov     ecx, [rdi+420h]                                                ; +0xa4, 0x1404a00d4\nmov     r9d, [rdi+46Ch]                                                ; +0xaa, 0x1404a00da\ntest    r9d, r9d                                                       ; +0xb1, 0x1404a00e1\njnz     short loc_1404A00ED                                            ; +0xb4, 0x1404a00e4\nmov     r9d, [rdi+464h]                                                ; +0xb6, 0x1404a00e6\nmov     rax, [r10]                                                     ; +0xbd, 0x1404a00ed\nlea     r8, [rdi+5E0h]                                                 ; +0xc0, 0x1404a00f0\nlea     rdx, [rdi+5B8h]                                                ; +0xc7, 0x1404a00f7\nmov     [rsp+48h+var_18], 0                                            ; +0xce, 0x1404a00fe\nmov     [rsp+48h+var_20], 0                                            ; +0xd3, 0x1404a0103\nmov     [rsp+48h+var_28], ecx                                          ; +0xdb, 0x1404a010b\nmov     rcx, r10                                                       ; +0xdf, 0x1404a010f\ncall    qword ptr [rax+518h]                                           ; +0xe2, 0x1404a0112\njmp     loc_1404A01AA                                                  ; +0xe8, 0x1404a0118\ntest    rax, rax                                                       ; +0xed, 0x1404a011d\njnz     short loc_1404A0151                                            ; +0xf0, 0x1404a0120\nmov     ecx, 668h; Size                                                ; +0xf2, 0x1404a0122\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xf7, 0x1404a0127\nmov     [rsp+48h+arg_0], rax                                           ; +0xfc, 0x1404a012c\nmov     rcx, rax                                                       ; +0x101, 0x1404a0131\ncall    sub_14017AB00                                                  ; +0x104, 0x1404a0134\nnop                                                                    ; +0x109, 0x1404a0139\nmov     cs:qword_1406C2ED8, rax                                        ; +0x10a, 0x1404a013a\nmov     rdx, [rax]                                                     ; +0x111, 0x1404a0141\nmov     rcx, rax                                                       ; +0x114, 0x1404a0144\ncall    qword ptr [rdx+48h]                                            ; +0x117, 0x1404a0147\nmov     rax, cs:qword_1406C2ED8                                        ; +0x11a, 0x1404a014a\nmov     r11, [rax+208h]                                                ; +0x121, 0x1404a0151\nmov     ecx, [rdi+470h]                                                ; +0x128, 0x1404a0158\ntest    ecx, ecx                                                       ; +0x12e, 0x1404a015e\njnz     short loc_1404A0168                                            ; +0x130, 0x1404a0160\nmov     ecx, [rdi+420h]                                                ; +0x132, 0x1404a0162\nmov     r9d, [rdi+46Ch]                                                ; +0x138, 0x1404a0168\ntest    r9d, r9d                                                       ; +0x13f, 0x1404a016f\njnz     short loc_1404A017B                                            ; +0x142, 0x1404a0172\nmov     r9d, [rdi+464h]                                                ; +0x144, 0x1404a0174\nmov     r10, [r11]                                                     ; +0x14b, 0x1404a017b\nmovzx   eax, byte ptr [rdi+549h]                                       ; +0x14e, 0x1404a017e\nlea     r8, [rdi+5E0h]                                                 ; +0x155, 0x1404a0185\nlea     rdx, [rdi+5B8h]                                                ; +0x15c, 0x1404a018c\nmov     [rsp+48h+var_18], 0                                            ; +0x163, 0x1404a0193\nmov     [rsp+48h+var_20], eax                                          ; +0x168, 0x1404a0198\nmov     [rsp+48h+var_28], ecx                                          ; +0x16c, 0x1404a019c\nmov     rcx, r11                                                       ; +0x170, 0x1404a01a0\ncall    qword ptr [r10+518h]                                           ; +0x173, 0x1404a01a3\nmov     [rdi+308h], rax                                                ; +0x17a, 0x1404a01aa\nmov     rbx, [rdi]                                                     ; +0x181, 0x1404a01b1\nmov     rcx, rdi                                                       ; +0x184, 0x1404a01b4\ncall    qword ptr [rbx+0C8h]                                           ; +0x187, 0x1404a01b7\nmov     rdx, rax                                                       ; +0x18d, 0x1404a01bd\nmov     rcx, rdi                                                       ; +0x190, 0x1404a01c0\ncall    qword ptr [rbx+0B8h]                                           ; +0x193, 0x1404a01c3\nmov     rcx, [rdi+308h]                                                ; +0x199, 0x1404a01c9\ntest    rcx, rcx                                                       ; +0x1a0, 0x1404a01d0\njz      short loc_1404A021E                                            ; +0x1a3, 0x1404a01d3\nmov     rax, [rcx]                                                     ; +0x1a5, 0x1404a01d5\ncall    qword ptr [rax+380h]                                           ; +0x1a8, 0x1404a01d8\nxorps   xmm1, xmm1                                                     ; +0x1ae, 0x1404a01de\ncomiss  xmm0, xmm1                                                     ; +0x1b1, 0x1404a01e1\nsetnb   al                                                             ; +0x1b4, 0x1404a01e4\nmov     [rdi+57Ah], al                                                 ; +0x1b7, 0x1404a01e7\ntest    al, al                                                         ; +0x1bd, 0x1404a01ed\njz      short loc_1404A020F                                            ; +0x1bf, 0x1404a01ef\nmov     rcx, [rdi+308h]                                                ; +0x1c1, 0x1404a01f1\ncall    cs:?stopSystem@CCParticleSystem@cocos2d@@QEAAXXZ; cocos2d::CCParticleSystem::stopSystem(void) ; +0x1c8, 0x1404a01f8\nmov     byte ptr [rdi+718h], 1                                         ; +0x1ce, 0x1404a01fe\nmov     dword ptr [rdi+714h], 0BF800000h                               ; +0x1d5, 0x1404a0205\nmov     rdx, [rdi+308h]                                                ; +0x1df, 0x1404a020f\nmov     rcx, rdi                                                       ; +0x1e6, 0x1404a0216\ncall    ParticleGameObject__applyParticleSettings                      ; +0x1e9, 0x1404a0219\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x1ee, 0x1404a021e\nadd     rsp, 40h                                                       ; +0x1f3, 0x1404a0223\npop     rdi                                                            ; +0x1f7, 0x1404a0227\nretn                                                                   ; +0x1f8, 0x1404a0228", "xrefs": ["<???> @ 0x14060d8d0", "<???> @ 0x1406dc4dc"], "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"}