{"type": "func", "start": 5373120832, "end": 5373121143, "name": "CreateParticlePopup::onClose", "pseudocode": "// \n// CreateParticlePopup::onClose from 0x140435140 to 0x140435277 (311 bytes)\n// \n// 5 xrefs:\n// > CreateParticlePopup::keyBackClicked @ 0x140435289\n// > CreateParticlePopup::init @ 0x14042cb2f\n// > <???> @ 0x1406a153c\n// > <???> @ 0x1406a1574\n// > <???> @ 0x1406d9cd4\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 CreateParticlePopup::onClose(CreateParticlePopup *a1, cocos2d::CCObject *a2)\n{\n  _BOOL8 v3; // rdx\n  unsigned __int8 *v4; // rax\n  cocos2d::CCArray *m_targetObjects; // rcx\n  unsigned int v6; // ebp\n  ParticleGameObject *v7; // rsi\n  struct cocos2d::CCObject *v8; // rdi\n  unsigned __int8 *v9; // rax\n  unsigned __int8 v10[40]; // [rsp+20h] [rbp-28h] BYREF\n\n  CreateParticlePopup::willClose(a1);\n  if ( a1->m_targetObject )\n  {\n    v4 = GameToolbox::saveParticleToString(v10, (__int64)a1->m_particle);\n    ParticleGameObject::setParticleString(a1->m_targetObject, v4);\n    a1->m_targetObject->m_popupPage = a1->m_page;\n    a1->m_targetObject->m_hasUniformObjectColor = a1->m_particle->m_bUseUniformColorMode;\n    ParticleGameObject::updateParticle(a1->m_targetObject);\n  }\n  else\n  {\n    m_targetObjects = a1->m_targetObjects;\n    if ( m_targetObjects )\n    {\n      v6 = 0;\n      if ( cocos2d::CCArray::count(m_targetObjects) )\n      {\n        do\n        {\n          v7 = (ParticleGameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, v6);\n          v8 = cocos2d::CCArray::objectAtIndex(a1->m_particles, v6);\n          v9 = GameToolbox::saveParticleToString(v10, (__int64)v8);\n          ParticleGameObject::setParticleString(v7, v9);\n          v7->m_hasUniformObjectColor = v8[13].m_uReference;\n          ParticleGameObject::updateParticle(v7);\n          ++v6;\n        }\n        while ( v6 < cocos2d::CCArray::count(a1->m_targetObjects) );\n      }\n    }\n  }\n  LOBYTE(v3) = 1;\n  a1->removeFromParentAndCleanup(a1, v3);\n}", "assembly": "; \n; CreateParticlePopup::onClose from 0x140435140 to 0x140435277 (311 bytes)\n; \n; 5 xrefs:\n; > CreateParticlePopup::keyBackClicked @ 0x140435289\n; > CreateParticlePopup::init @ 0x14042cb2f\n; > <???> @ 0x1406a153c\n; > <???> @ 0x1406a1574\n; > <???> @ 0x1406d9cd4\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\npush    rbx                                                            ; +0x0, 0x140435140\nsub     rsp, 40h                                                       ; +0x2, 0x140435142\nmov     rbx, rcx                                                       ; +0x6, 0x140435146\ncall    CreateParticlePopup__willClose                                 ; +0x9, 0x140435149\ncmp     qword ptr [rbx+290h], 0                                        ; +0xe, 0x14043514e\njz      short loc_1404351B7                                            ; +0x16, 0x140435156\nmov     rdx, [rbx+2B0h]                                                ; +0x18, 0x140435158\nlea     rcx, [rsp+48h+var_28]                                          ; +0x1f, 0x14043515f\ncall    GameToolbox__saveParticleToString                              ; +0x24, 0x140435164\nmov     rcx, [rbx+290h]                                                ; +0x29, 0x140435169\nmov     rdx, rax                                                       ; +0x30, 0x140435170\ncall    ParticleGameObject__setParticleString                          ; +0x33, 0x140435173\nmov     rcx, [rbx+290h]                                                ; +0x38, 0x140435178\nmov     eax, [rbx+3A4h]                                                ; +0x3f, 0x14043517f\nmov     [rcx+70Ch], eax                                                ; +0x45, 0x140435185\nmov     rax, [rbx+2B0h]                                                ; +0x4b, 0x14043518b\nmov     rcx, [rbx+290h]                                                ; +0x52, 0x140435192\nmovzx   eax, byte ptr [rax+2ECh]                                       ; +0x59, 0x140435199\nmov     [rcx+708h], al                                                 ; +0x60, 0x1404351a0\nmov     rcx, [rbx+290h]                                                ; +0x66, 0x1404351a6\ncall    ParticleGameObject__updateParticle                             ; +0x6d, 0x1404351ad\njmp     loc_140435263                                                  ; +0x72, 0x1404351b2\nmov     rcx, [rbx+298h]                                                ; +0x77, 0x1404351b7\ntest    rcx, rcx                                                       ; +0x7e, 0x1404351be\njz      loc_140435263                                                  ; +0x81, 0x1404351c1\nmov     [rsp+48h+arg_8], rbp                                           ; +0x87, 0x1404351c7\nxor     ebp, ebp                                                       ; +0x8c, 0x1404351cc\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x8e, 0x1404351ce\ntest    eax, eax                                                       ; +0x94, 0x1404351d4\njz      loc_14043525E                                                  ; +0x96, 0x1404351d6\nmov     [rsp+48h+arg_10], rsi                                          ; +0x9c, 0x1404351dc\nmov     [rsp+48h+arg_18], rdi                                          ; +0xa1, 0x1404351e1\nnop     word ptr [rax+rax+00000000h]                                   ; +0xa6, 0x1404351e6\nmov     rcx, [rbx+298h]                                                ; +0xb0, 0x1404351f0\nmov     edx, ebp                                                       ; +0xb7, 0x1404351f7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xb9, 0x1404351f9\nmov     rcx, [rbx+2A0h]                                                ; +0xbf, 0x1404351ff\nmov     edx, ebp                                                       ; +0xc6, 0x140435206\nmov     rsi, rax                                                       ; +0xc8, 0x140435208\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xcb, 0x14043520b\nmov     rdx, rax                                                       ; +0xd1, 0x140435211\nlea     rcx, [rsp+48h+var_28]                                          ; +0xd4, 0x140435214\nmov     rdi, rax                                                       ; +0xd9, 0x140435219\ncall    GameToolbox__saveParticleToString                              ; +0xdc, 0x14043521c\nmov     rdx, rax                                                       ; +0xe1, 0x140435221\nmov     rcx, rsi                                                       ; +0xe4, 0x140435224\ncall    ParticleGameObject__setParticleString                          ; +0xe7, 0x140435227\nmovzx   eax, byte ptr [rdi+2ECh]                                       ; +0xec, 0x14043522c\nmov     rcx, rsi                                                       ; +0xf3, 0x140435233\nmov     [rsi+708h], al                                                 ; +0xf6, 0x140435236\ncall    ParticleGameObject__updateParticle                             ; +0xfc, 0x14043523c\nmov     rcx, [rbx+298h]                                                ; +0x101, 0x140435241\ninc     ebp                                                            ; +0x108, 0x140435248\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x10a, 0x14043524a\ncmp     ebp, eax                                                       ; +0x110, 0x140435250\njb      short loc_1404351F0                                            ; +0x112, 0x140435252\nmov     rdi, [rsp+48h+arg_18]                                          ; +0x114, 0x140435254\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x119, 0x140435259\nmov     rbp, [rsp+48h+arg_8]                                           ; +0x11e, 0x14043525e\nmov     rax, [rbx]                                                     ; +0x123, 0x140435263\nmov     dl, 1                                                          ; +0x126, 0x140435266\nmov     rcx, rbx                                                       ; +0x128, 0x140435268\nadd     rsp, 40h                                                       ; +0x12b, 0x14043526b\npop     rbx                                                            ; +0x12f, 0x14043526f\njmp     qword ptr [rax+1F8h]                                           ; +0x130, 0x140435270", "xrefs": ["CreateParticlePopup::keyBackClicked @ 0x140435289", "CreateParticlePopup::init @ 0x14042cb2f", "<???> @ 0x1406a153c", "<???> @ 0x1406a1574", "<???> @ 0x1406d9cd4"], "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"}