{"type": "func", "start": 4296401184, "end": 4296401686, "name": "GJBaseGameLayer::claimCustomParticle", "pseudocode": "// \n// GJBaseGameLayer::claimCustomParticle from 0x10015e120 to 0x10015e316 (502 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1008b73f8\n// > <???> @ 0x1008c1978\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\ncocos2d::CCParticleSystem *__fastcall GJBaseGameLayer::claimCustomParticle(\n        __int64 a1,\n        __int64 a2,\n        __int64 a3,\n        int a4,\n        unsigned int a5,\n        int a6,\n        __m128 a7,\n        unsigned __int8 a8)\n{\n  __int64 v9; // rax\n  __int64 v10; // r12\n  cocos2d::CCParticleSystem *v11; // r14\n  __int64 v12; // rax\n  cocos2d::CCNode *v13; // r15\n  __int64 v14; // rax\n  cocos2d::CCParticleSystem_vtbl *v15; // rcx\n  __int64 v16; // r12\n  __int64 v17; // rdx\n  int v18; // eax\n  char v19; // dl\n  unsigned int m_uID; // [rsp+8h] [rbp-38h] BYREF\n  int v22; // [rsp+Ch] [rbp-34h]\n  int v23; // [rsp+10h] [rbp-30h]\n  unsigned int v24; // [rsp+14h] [rbp-2Ch]\n\n  if ( *(int *)(a1 + 12104) > 99999 )\n    return nullptr;\n  v23 = a4;\n  v22 = a6;\n  v24 = a5;\n  v9 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 12128), a2);\n  if ( !v9 )\n  {\n    v11 = (cocos2d::CCParticleSystem *)(*(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD, _QWORD))(*(_QWORD *)a1 + 1440LL))(\n                                         a1,\n                                         a2,\n                                         a3,\n                                         0,\n                                         a8);\n    v10 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 12128), a2);\n    if ( a8 )\n      goto LABEL_8;\n    goto LABEL_7;\n  }\n  v10 = v9;\n  if ( ((a8 ^ 1) & ((unsigned int)sub_100720070(v9) != 0)) == 0 )\n  {\n    v11 = (cocos2d::CCParticleSystem *)(*(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD, _QWORD))(*(_QWORD *)a1 + 1440LL))(\n                                         a1,\n                                         a2,\n                                         a3,\n                                         0,\n                                         a8);\n    if ( a8 )\n      goto LABEL_8;\nLABEL_7:\n    v11 = (cocos2d::CCParticleSystem *)sub_1007200E0(v10);\n    v12 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 12184), a2);\n    sub_10071FCD0(v12, v11);\n    sub_100720200(v10, 1);\n    goto LABEL_8;\n  }\n  v11 = nullptr;\n  if ( !a8 )\n    goto LABEL_7;\nLABEL_8:\n  if ( !v11 )\n    return nullptr;\n  v13 = GJBaseGameLayer::parentForZLayer((GJBaseGameLayer *)a1, v23, 0, 4, v22);\n  v14 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystem *))v11->getParent)(v11);\n  v15 = v11->cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  if ( (cocos2d::CCNode *)v14 != v13 )\n  {\n    v16 = 448;\n    if ( ((__int64 (__fastcall *)(cocos2d::CCParticleSystem *))v15->getParent)(v11) )\n      ((void (__fastcall *)(cocos2d::CCParticleSystem *, _QWORD))v11->removeFromParentAndCleanup)(v11, 0);\n    v17 = v24;\n    goto LABEL_17;\n  }\n  v18 = ((__int64 (__fastcall *)(cocos2d::CCParticleSystem *))v15->getZOrder)(v11);\n  v16 = 576;\n  v17 = v24;\n  if ( v18 != v24 )\nLABEL_17:\n    *(double *)a7.i64 = (*(double (__fastcall **)(cocos2d::CCNode *, cocos2d::CCParticleSystem *, __int64))((char *)&v13->copyWithZone + v16))(\n                          v13,\n                          v11,\n                          v17);\n  m_uID = v11->m_uID;\n  sub_100056510((float *)(a1 + 12200), (int *)&m_uID, &m_uID, a7);\n  if ( (v19 & 1) != 0 )\n    sub_10071FCD0(*(_QWORD *)(a1 + 12192), v11);\n  cocos2d::CCParticleSystem::resetSystem(v11);\n  ((void (__fastcall *)(cocos2d::CCParticleSystem *, __int64))v11->setVisible)(v11, 1);\n  ((void (__fastcall *)(cocos2d::CCParticleSystem *, _QWORD))v11->setAutoRemoveOnFinish)(v11, a8);\n  *(_DWORD *)(a1 + 12104) += ((__int64 (__fastcall *)(cocos2d::CCParticleSystem *))v11->getTotalParticles)(v11);\n  return v11;\n}", "assembly": "; \n; GJBaseGameLayer::claimCustomParticle from 0x10015e120 to 0x10015e316 (502 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1008b73f8\n; > <???> @ 0x1008c1978\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    rbp                                                            ; +0x0, 0x10015e120\nmov     rbp, rsp                                                       ; +0x1, 0x10015e121\npush    r15                                                            ; +0x4, 0x10015e124\npush    r14                                                            ; +0x6, 0x10015e126\npush    r13                                                            ; +0x8, 0x10015e128\npush    r12                                                            ; +0xa, 0x10015e12a\npush    rbx                                                            ; +0xc, 0x10015e12c\nsub     rsp, 18h                                                       ; +0xd, 0x10015e12d\ncmp     dword ptr [rdi+2F48h], 1869Fh                                  ; +0x11, 0x10015e131\njg      loc_10015E268                                                  ; +0x1b, 0x10015e13b\nmov     r15, rsi                                                       ; +0x21, 0x10015e141\nmov     rbx, rdi                                                       ; +0x24, 0x10015e144\nmov     [rbp+var_30], ecx                                              ; +0x27, 0x10015e147\nmov     [rbp+var_34], r9d                                              ; +0x2a, 0x10015e14a\nmov     [rbp+var_2C], r8d                                              ; +0x2e, 0x10015e14e\nmov     r14, rdx                                                       ; +0x32, 0x10015e152\nmovzx   r13d, [rbp+arg_0]                                              ; +0x35, 0x10015e155\nmov     rdi, [rdi+2F60h]                                               ; +0x3a, 0x10015e15a\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0x41, 0x10015e161\ntest    rax, rax                                                       ; +0x46, 0x10015e166\njz      short loc_10015E1AB                                            ; +0x49, 0x10015e169\nmov     r12, rax                                                       ; +0x4b, 0x10015e16b\nmov     rdi, rax                                                       ; +0x4e, 0x10015e16e\ncall    sub_100720070                                                  ; +0x51, 0x10015e171\ntest    eax, eax                                                       ; +0x56, 0x10015e176\nsetnz   al                                                             ; +0x58, 0x10015e178\nmov     ecx, r13d                                                      ; +0x5b, 0x10015e17b\nxor     cl, 1                                                          ; +0x5e, 0x10015e17e\ntest    al, cl                                                         ; +0x61, 0x10015e181\njnz     loc_10015E270                                                  ; +0x63, 0x10015e183\nmov     rax, [rbx]                                                     ; +0x69, 0x10015e189\nmovzx   r8d, r13b                                                      ; +0x6c, 0x10015e18c\nmov     rdi, rbx                                                       ; +0x70, 0x10015e190\nmov     rsi, r15                                                       ; +0x73, 0x10015e193\nmov     rdx, r14                                                       ; +0x76, 0x10015e196\nxor     ecx, ecx                                                       ; +0x79, 0x10015e199\ncall    qword ptr [rax+5A0h]                                           ; +0x7b, 0x10015e19b\nmov     r14, rax                                                       ; +0x81, 0x10015e1a1\ntest    r13b, r13b                                                     ; +0x84, 0x10015e1a4\njz      short loc_10015E1DD                                            ; +0x87, 0x10015e1a7\njmp     short loc_10015E20F                                            ; +0x89, 0x10015e1a9\nmov     rax, [rbx]                                                     ; +0x8b, 0x10015e1ab\nmovzx   r8d, r13b                                                      ; +0x8e, 0x10015e1ae\nmov     rdi, rbx                                                       ; +0x92, 0x10015e1b2\nmov     rsi, r15                                                       ; +0x95, 0x10015e1b5\nmov     rdx, r14                                                       ; +0x98, 0x10015e1b8\nxor     ecx, ecx                                                       ; +0x9b, 0x10015e1bb\ncall    qword ptr [rax+5A0h]                                           ; +0x9d, 0x10015e1bd\nmov     r14, rax                                                       ; +0xa3, 0x10015e1c3\nmov     rdi, [rbx+2F60h]                                               ; +0xa6, 0x10015e1c6\nmov     rsi, r15                                                       ; +0xad, 0x10015e1cd\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0xb0, 0x10015e1d0\nmov     r12, rax                                                       ; +0xb5, 0x10015e1d5\ntest    r13b, r13b                                                     ; +0xb8, 0x10015e1d8\njnz     short loc_10015E20F                                            ; +0xbb, 0x10015e1db\nmov     rdi, r12                                                       ; +0xbd, 0x10015e1dd\ncall    sub_1007200E0                                                  ; +0xc0, 0x10015e1e0\nmov     r14, rax                                                       ; +0xc5, 0x10015e1e5\nmov     rdi, [rbx+2F98h]                                               ; +0xc8, 0x10015e1e8\nmov     rsi, r15                                                       ; +0xcf, 0x10015e1ef\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0xd2, 0x10015e1f2\nmov     rdi, rax                                                       ; +0xd7, 0x10015e1f7\nmov     rsi, r14                                                       ; +0xda, 0x10015e1fa\ncall    sub_10071FCD0                                                  ; +0xdd, 0x10015e1fd\nmov     rdi, r12                                                       ; +0xe2, 0x10015e202\nmov     esi, 1                                                         ; +0xe5, 0x10015e205\ncall    sub_100720200                                                  ; +0xea, 0x10015e20a\ntest    r14, r14                                                       ; +0xef, 0x10015e20f\njz      short loc_10015E268                                            ; +0xf2, 0x10015e212\nmov     rdi, rbx                                                       ; +0xf4, 0x10015e214\nmov     esi, [rbp+var_30]                                              ; +0xf7, 0x10015e217\nxor     edx, edx                                                       ; +0xfa, 0x10015e21a\nmov     ecx, 4                                                         ; +0xfc, 0x10015e21c\nmov     r8d, [rbp+var_34]                                              ; +0x101, 0x10015e221\ncall    GJBaseGameLayer__parentForZLayer                               ; +0x105, 0x10015e225\nmov     r15, rax                                                       ; +0x10a, 0x10015e22a\nmov     rax, [r14]                                                     ; +0x10d, 0x10015e22d\nmov     rdi, r14                                                       ; +0x110, 0x10015e230\ncall    qword ptr [rax+1F0h]                                           ; +0x113, 0x10015e233\nmov     rcx, [r14]                                                     ; +0x119, 0x10015e239\nmov     rdi, r14                                                       ; +0x11c, 0x10015e23c\ncmp     rax, r15                                                       ; +0x11f, 0x10015e23f\njz      short loc_10015E27E                                            ; +0x122, 0x10015e242\ncall    qword ptr [rcx+1F0h]                                           ; +0x124, 0x10015e244\nmov     r12d, 1C0h                                                     ; +0x12a, 0x10015e24a\ntest    rax, rax                                                       ; +0x130, 0x10015e250\njz      short loc_10015E263                                            ; +0x133, 0x10015e253\nmov     rax, [r14]                                                     ; +0x135, 0x10015e255\nmov     rdi, r14                                                       ; +0x138, 0x10015e258\nxor     esi, esi                                                       ; +0x13b, 0x10015e25b\ncall    qword ptr [rax+200h]                                           ; +0x13d, 0x10015e25d\nmov     edx, [rbp+var_2C]                                              ; +0x143, 0x10015e263\njmp     short loc_10015E28E                                            ; +0x146, 0x10015e266\nxor     r14d, r14d                                                     ; +0x148, 0x10015e268\njmp     loc_10015E304                                                  ; +0x14b, 0x10015e26b\nxor     r14d, r14d                                                     ; +0x150, 0x10015e270\ntest    r13b, r13b                                                     ; +0x153, 0x10015e273\njz      loc_10015E1DD                                                  ; +0x156, 0x10015e276\njmp     short loc_10015E20F                                            ; +0x15c, 0x10015e27c\ncall    qword ptr [rcx+68h]                                            ; +0x15e, 0x10015e27e\nmov     r12d, 240h                                                     ; +0x161, 0x10015e281\nmov     edx, [rbp+var_2C]                                              ; +0x167, 0x10015e287\ncmp     eax, edx                                                       ; +0x16a, 0x10015e28a\njz      short loc_10015E29B                                            ; +0x16c, 0x10015e28c\nmov     rax, [r15]                                                     ; +0x16e, 0x10015e28e\nmov     rdi, r15                                                       ; +0x171, 0x10015e291\nmov     rsi, r14                                                       ; +0x174, 0x10015e294\ncall    qword ptr [rax+r12]                                            ; +0x177, 0x10015e297\nlea     rdi, [rbx+2FA8h]                                               ; +0x17b, 0x10015e29b\nmov     eax, [r14+8]                                                   ; +0x182, 0x10015e2a2\nmov     [rbp+var_38], eax                                              ; +0x186, 0x10015e2a6\nlea     rdx, [rbp+var_38]                                              ; +0x189, 0x10015e2a9\nmov     rsi, rdx                                                       ; +0x18d, 0x10015e2ad\ncall    sub_100056510                                                  ; +0x190, 0x10015e2b0\ntest    dl, 1                                                          ; +0x195, 0x10015e2b5\njz      short loc_10015E2C9                                            ; +0x198, 0x10015e2b8\nmov     rdi, [rbx+2FA0h]                                               ; +0x19a, 0x10015e2ba\nmov     rsi, r14                                                       ; +0x1a1, 0x10015e2c1\ncall    sub_10071FCD0                                                  ; +0x1a4, 0x10015e2c4\nmov     rdi, r14                                                       ; +0x1a9, 0x10015e2c9\ncall    cocos2d__CCParticleSystem__resetSystem                         ; +0x1ac, 0x10015e2cc\nmov     rax, [r14]                                                     ; +0x1b1, 0x10015e2d1\nmov     rdi, r14                                                       ; +0x1b4, 0x10015e2d4\nmov     esi, 1                                                         ; +0x1b7, 0x10015e2d7\ncall    qword ptr [rax+148h]                                           ; +0x1bc, 0x10015e2dc\nmov     rax, [r14]                                                     ; +0x1c2, 0x10015e2e2\nmovzx   esi, [rbp+arg_0]                                               ; +0x1c5, 0x10015e2e5\nmov     rdi, r14                                                       ; +0x1c9, 0x10015e2e9\ncall    qword ptr [rax+620h]                                           ; +0x1cc, 0x10015e2ec\nmov     rax, [r14]                                                     ; +0x1d2, 0x10015e2f2\nmov     rdi, r14                                                       ; +0x1d5, 0x10015e2f5\ncall    qword ptr [rax+5C8h]                                           ; +0x1d8, 0x10015e2f8\nadd     [rbx+2F48h], eax                                               ; +0x1de, 0x10015e2fe\nmov     rax, r14                                                       ; +0x1e4, 0x10015e304\nadd     rsp, 18h                                                       ; +0x1e7, 0x10015e307\npop     rbx                                                            ; +0x1eb, 0x10015e30b\npop     r12                                                            ; +0x1ec, 0x10015e30c\npop     r13                                                            ; +0x1ee, 0x10015e30e\npop     r14                                                            ; +0x1f0, 0x10015e310\npop     r15                                                            ; +0x1f2, 0x10015e312\npop     rbp                                                            ; +0x1f4, 0x10015e314\nretn                                                                   ; +0x1f5, 0x10015e315", "xrefs": ["<???> @ 0x1008b73f8", "<???> @ 0x1008c1978"], "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"}