{"type": "func", "start": 5372907664, "end": 5372907928, "name": "LevelEditorLayer::updatePreviewParticles", "pseudocode": "// \n// LevelEditorLayer::updatePreviewParticles from 0x140401090 to 0x140401198 (264 bytes)\n// \n// 6 xrefs:\n// > EditorUI::handleEditorAction @ 0x1401c2e84\n// > EditorUI::toggleViewOption @ 0x1401f86e5\n// > LevelEditorLayer::updateEditorMode @ 0x1403fa62a\n// > LevelEditorLayer::onPlaytest @ 0x1403ff0cb\n// > LevelEditorLayer::onStopPlaytest @ 0x140400200\n// > <???> @ 0x140925ad8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:31:54 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nunsigned int __fastcall LevelEditorLayer::updatePreviewParticles(__int64 a1)\n{\n  __int64 v2; // rcx\n  __int64 v3; // rcx\n  bool GameVariable; // al\n  unsigned int v5; // edi\n  unsigned int result; // eax\n  struct cocos2d::CCObject *v7; // rax\n  void *v8; // [rsp+30h] [rbp+8h]\n  void *v9; // [rsp+30h] [rbp+8h]\n\n  v2 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v8 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = qword_14090BFD0;\n  }\n  *(_BYTE *)(a1 + 14668) = GameManager::getGameVariable(v2, \"0117\");\n  if ( *(_BYTE *)(a1 + 14672) )\n    goto LABEL_7;\n  v3 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v9 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager((__int64)v9);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v3 = qword_14090BFD0;\n  }\n  GameVariable = GameManager::getGameVariable(v3, \"0137\");\n  if ( GameVariable )\nLABEL_7:\n    GameVariable = 1;\n  *(_BYTE *)(a1 + 14671) = GameVariable;\n  v5 = 0;\n  result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 14744));\n  if ( result )\n  {\n    do\n    {\n      v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 14744), v5);\n      LevelEditorLayer::updatePreviewParticle(a1, v7);\n      ++v5;\n      result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 14744));\n    }\n    while ( v5 < result );\n  }\n  return result;\n}", "assembly": "; \n; LevelEditorLayer::updatePreviewParticles from 0x140401090 to 0x140401198 (264 bytes)\n; \n; 6 xrefs:\n; > EditorUI::handleEditorAction @ 0x1401c2e84\n; > EditorUI::toggleViewOption @ 0x1401f86e5\n; > LevelEditorLayer::updateEditorMode @ 0x1403fa62a\n; > LevelEditorLayer::onPlaytest @ 0x1403ff0cb\n; > LevelEditorLayer::onStopPlaytest @ 0x140400200\n; > <???> @ 0x140925ad8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:31:54 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140401090\npush    rdi                                                            ; +0x5, 0x140401095\nsub     rsp, 20h                                                       ; +0x6, 0x140401096\nmov     rbx, rcx                                                       ; +0xa, 0x14040109a\nmov     rcx, cs:qword_14090BFD0                                        ; +0xd, 0x14040109d\ntest    rcx, rcx                                                       ; +0x14, 0x1404010a4\njnz     short loc_1404010DB                                            ; +0x17, 0x1404010a7\nmov     ecx, 6E8h; Size                                                ; +0x19, 0x1404010a9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e, 0x1404010ae\nmov     [rsp+28h+arg_0], rax                                           ; +0x23, 0x1404010b3\nmov     rcx, rax                                                       ; +0x28, 0x1404010b8\ncall    GameManager__GameManager                                       ; +0x2b, 0x1404010bb\nnop                                                                    ; +0x30, 0x1404010c0\nmov     cs:qword_14090BFD0, rax                                        ; +0x31, 0x1404010c1\nmov     rcx, [rax]                                                     ; +0x38, 0x1404010c8\nmov     rdx, [rcx+48h]                                                 ; +0x3b, 0x1404010cb\nmov     rcx, rax                                                       ; +0x3f, 0x1404010cf\ncall    rdx                                                            ; +0x42, 0x1404010d2\nmov     rcx, cs:qword_14090BFD0                                        ; +0x44, 0x1404010d4\nlea     rdx, a0117; \"0117\"                                             ; +0x4b, 0x1404010db\ncall    GameManager__getGameVariable                                   ; +0x52, 0x1404010e2\nmov     [rbx+394Ch], al                                                ; +0x57, 0x1404010e7\ncmp     byte ptr [rbx+3950h], 0                                        ; +0x5d, 0x1404010ed\njnz     short loc_140401144                                            ; +0x64, 0x1404010f4\nmov     rcx, cs:qword_14090BFD0                                        ; +0x66, 0x1404010f6\ntest    rcx, rcx                                                       ; +0x6d, 0x1404010fd\njnz     short loc_140401134                                            ; +0x70, 0x140401100\nmov     ecx, 6E8h; Size                                                ; +0x72, 0x140401102\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x77, 0x140401107\nmov     [rsp+28h+arg_0], rax                                           ; +0x7c, 0x14040110c\nmov     rcx, rax                                                       ; +0x81, 0x140401111\ncall    GameManager__GameManager                                       ; +0x84, 0x140401114\nnop                                                                    ; +0x89, 0x140401119\nmov     cs:qword_14090BFD0, rax                                        ; +0x8a, 0x14040111a\nmov     rcx, [rax]                                                     ; +0x91, 0x140401121\nmov     rdx, [rcx+48h]                                                 ; +0x94, 0x140401124\nmov     rcx, rax                                                       ; +0x98, 0x140401128\ncall    rdx                                                            ; +0x9b, 0x14040112b\nmov     rcx, cs:qword_14090BFD0                                        ; +0x9d, 0x14040112d\nlea     rdx, a0137; \"0137\"                                             ; +0xa4, 0x140401134\ncall    GameManager__getGameVariable                                   ; +0xab, 0x14040113b\ntest    al, al                                                         ; +0xb0, 0x140401140\njz      short loc_140401146                                            ; +0xb2, 0x140401142\nmov     al, 1                                                          ; +0xb4, 0x140401144\nmov     [rbx+394Fh], al                                                ; +0xb6, 0x140401146\nxor     edi, edi                                                       ; +0xbc, 0x14040114c\nmov     rcx, [rbx+3998h]                                               ; +0xbe, 0x14040114e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc5, 0x140401155\ntest    eax, eax                                                       ; +0xcb, 0x14040115b\njz      short loc_14040118D                                            ; +0xcd, 0x14040115d\nnop                                                                    ; +0xcf, 0x14040115f\nmov     edx, edi                                                       ; +0xd0, 0x140401160\nmov     rcx, [rbx+3998h]                                               ; +0xd2, 0x140401162\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xd9, 0x140401169\nmov     rdx, rax                                                       ; +0xdf, 0x14040116f\nmov     rcx, rbx                                                       ; +0xe2, 0x140401172\ncall    LevelEditorLayer__updatePreviewParticle                        ; +0xe5, 0x140401175\ninc     edi                                                            ; +0xea, 0x14040117a\nmov     rcx, [rbx+3998h]                                               ; +0xec, 0x14040117c\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xf3, 0x140401183\ncmp     edi, eax                                                       ; +0xf9, 0x140401189\njb      short loc_140401160                                            ; +0xfb, 0x14040118b\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xfd, 0x14040118d\nadd     rsp, 20h                                                       ; +0x102, 0x140401192\npop     rdi                                                            ; +0x106, 0x140401196\nretn                                                                   ; +0x107, 0x140401197", "xrefs": ["EditorUI::handleEditorAction @ 0x1401c2e84", "EditorUI::toggleViewOption @ 0x1401f86e5", "LevelEditorLayer::updateEditorMode @ 0x1403fa62a", "LevelEditorLayer::onPlaytest @ 0x1403ff0cb", "LevelEditorLayer::onStopPlaytest @ 0x140400200", "<???> @ 0x140925ad8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}