{"type": "func", "start": 5372908080, "end": 5372908276, "name": "LevelEditorLayer::claimCustomParticle", "pseudocode": "// \n// LevelEditorLayer::claimCustomParticle from 0x140401230 to 0x1404012f4 (196 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x14078b318\n// > <???> @ 0x140925ae4\n// > <???> @ 0x140925af0\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\nstruct cocos2d::CCObject *__fastcall LevelEditorLayer::claimCustomParticle(\n        __int64 a1,\n        __int64 a2,\n        unsigned int *a3,\n        int a4,\n        unsigned int a5,\n        int a6,\n        unsigned __int8 a7)\n{\n  struct cocos2d::CCObject *v10; // rbx\n  __int64 v11; // rdx\n  struct cocos2d::CCObject *v12; // rax\n\n  if ( !*(_BYTE *)(a1 + 14668) )\n    return nullptr;\n  v10 = GameToolbox::particleFromStruct(a3, nullptr, 1);\n  cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 12808), v10);\n  cocos2d::CCParticleSystem::resetSystem(v10);\n  LOBYTE(v11) = 1;\n  (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v10 + 336LL))(v10, v11);\n  (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v10 + 1544LL))(v10, a7);\n  v12 = GJBaseGameLayer::parentForZLayer(a1, a4, 0, 4, 0);\n  (*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v12 + 456LL))(\n    v12,\n    v10,\n    a5);\n  return v10;\n}", "assembly": "; \n; LevelEditorLayer::claimCustomParticle from 0x140401230 to 0x1404012f4 (196 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x14078b318\n; > <???> @ 0x140925ae4\n; > <???> @ 0x140925af0\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], rsi                                               ; +0x0, 0x140401230\npush    rdi                                                            ; +0x5, 0x140401235\nsub     rsp, 30h                                                       ; +0x6, 0x140401236\ncmp     byte ptr [rcx+394Ch], 0                                        ; +0xa, 0x14040123a\nmov     esi, r9d                                                       ; +0x11, 0x140401241\nmov     rax, r8                                                        ; +0x14, 0x140401244\nmov     rdi, rcx                                                       ; +0x17, 0x140401247\njnz     short loc_140401259                                            ; +0x1a, 0x14040124a\nxor     eax, eax                                                       ; +0x1c, 0x14040124c\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x1e, 0x14040124e\nadd     rsp, 30h                                                       ; +0x23, 0x140401253\npop     rdi                                                            ; +0x27, 0x140401257\nretn                                                                   ; +0x28, 0x140401258\nmov     r8b, 1                                                         ; +0x29, 0x140401259\nmov     [rsp+38h+arg_0], rbx                                           ; +0x2c, 0x14040125c\nxor     edx, edx                                                       ; +0x31, 0x140401261\nmov     rcx, rax                                                       ; +0x33, 0x140401263\ncall    GameToolbox__particleFromStruct                                ; +0x36, 0x140401266\nmov     rcx, [rdi+3208h]                                               ; +0x3b, 0x14040126b\nmov     rdx, rax                                                       ; +0x42, 0x140401272\nmov     rbx, rax                                                       ; +0x45, 0x140401275\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x48, 0x140401278\nmov     rcx, rbx                                                       ; +0x4e, 0x14040127e\ncall    cs:?resetSystem@CCParticleSystem@cocos2d@@QEAAXXZ; cocos2d::CCParticleSystem::resetSystem(void) ; +0x51, 0x140401281\nmov     rcx, [rbx]                                                     ; +0x57, 0x140401287\nmov     dl, 1                                                          ; +0x5a, 0x14040128a\nmov     r8, [rcx+150h]                                                 ; +0x5c, 0x14040128c\nmov     rcx, rbx                                                       ; +0x63, 0x140401293\ncall    r8                                                             ; +0x66, 0x140401296\nmov     rcx, [rbx]                                                     ; +0x69, 0x140401299\nmovzx   edx, [rsp+38h+arg_30]                                          ; +0x6c, 0x14040129c\nmov     r8, [rcx+608h]                                                 ; +0x71, 0x1404012a1\nmov     rcx, rbx                                                       ; +0x78, 0x1404012a8\ncall    r8                                                             ; +0x7b, 0x1404012ab\nmov     r9d, 4                                                         ; +0x7e, 0x1404012ae\nmov     [rsp+38h+var_18], 0                                            ; +0x84, 0x1404012b4\nxor     r8d, r8d                                                       ; +0x8c, 0x1404012bc\nmov     edx, esi                                                       ; +0x8f, 0x1404012bf\nmov     rcx, rdi                                                       ; +0x91, 0x1404012c1\ncall    GJBaseGameLayer__parentForZLayer                               ; +0x94, 0x1404012c4\nmov     r8d, [rsp+38h+arg_20]                                          ; +0x99, 0x1404012c9\nmov     rdx, rbx                                                       ; +0x9e, 0x1404012ce\nmov     rcx, [rax]                                                     ; +0xa1, 0x1404012d1\nmov     r9, [rcx+1C8h]                                                 ; +0xa4, 0x1404012d4\nmov     rcx, rax                                                       ; +0xab, 0x1404012db\ncall    r9                                                             ; +0xae, 0x1404012de\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xb1, 0x1404012e1\nmov     rax, rbx                                                       ; +0xb6, 0x1404012e6\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xb9, 0x1404012e9\nadd     rsp, 30h                                                       ; +0xbe, 0x1404012ee\npop     rdi                                                            ; +0xc2, 0x1404012f2\nretn                                                                   ; +0xc3, 0x1404012f3", "xrefs": ["<???> @ 0x14078b318", "<???> @ 0x140925ae4", "<???> @ 0x140925af0"], "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"}