{"type": "func", "start": 6442894576, "end": 6442894827, "name": "cocos2d::CCParticleSystemQuad::allocMemory", "pseudocode": "// \n// cocos2d::CCParticleSystemQuad::allocMemory from 0x18006c4f0 to 0x18006c5eb (251 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCParticleSystemQuad::initWithTotalParticles @ 0x18006cbd5\n// > cocos2d::CCParticleSystemQuad::setBatchNode @ 0x18006cce7\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bdfe4\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:21:55 +0000\n// \n\nchar __fastcall cocos2d::CCParticleSystemQuad::allocMemory(cocos2d::CCParticleSystemQuad *this)\n{\n  void *v2; // rcx\n  void *v3; // rcx\n  void *v4; // rax\n  void *v5; // rcx\n  void *v7; // rcx\n\n  v2 = *((void **)this + 99);\n  if ( v2 )\n  {\n    free(v2);\n    *((_QWORD *)this + 99) = 0;\n  }\n  v3 = *((void **)this + 100);\n  if ( v3 )\n  {\n    free(v3);\n    *((_QWORD *)this + 100) = 0;\n  }\n  *((_QWORD *)this + 99) = malloc(96LL * *((unsigned int *)this + 167));\n  v4 = malloc(2LL * (unsigned int)(6 * *((_DWORD *)this + 167)));\n  v5 = *((void **)this + 99);\n  *((_QWORD *)this + 100) = v4;\n  if ( v5 )\n  {\n    if ( v4 )\n    {\n      memset(v5, 0, 96LL * *((unsigned int *)this + 167));\n      memset(*((void **)this + 100), 0, 2LL * (unsigned int)(6 * *((_DWORD *)this + 167)));\n      return 1;\n    }\n    free(v5);\n    *((_QWORD *)this + 99) = 0;\n  }\n  v7 = *((void **)this + 100);\n  if ( v7 )\n  {\n    free(v7);\n    *((_QWORD *)this + 100) = 0;\n  }\n  return 0;\n}", "assembly": "; \n; cocos2d::CCParticleSystemQuad::allocMemory from 0x18006c4f0 to 0x18006c5eb (251 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCParticleSystemQuad::initWithTotalParticles @ 0x18006cbd5\n; > cocos2d::CCParticleSystemQuad::setBatchNode @ 0x18006cce7\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bdfe4\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:21:55 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x18006c4f0\npush    rdi                                                            ; +0x5, 0x18006c4f5\nsub     rsp, 20h                                                       ; +0x6, 0x18006c4f6\nmov     rbx, rcx                                                       ; +0xa, 0x18006c4fa\nxor     edi, edi                                                       ; +0xd, 0x18006c4fd\nmov     rcx, [rcx+318h]; Block                                         ; +0xf, 0x18006c4ff\ntest    rcx, rcx                                                       ; +0x16, 0x18006c506\njz      short loc_18006C518                                            ; +0x19, 0x18006c509\ncall    cs:__imp_free                                                  ; +0x1b, 0x18006c50b\nmov     [rbx+318h], rdi                                                ; +0x21, 0x18006c511\nmov     rcx, [rbx+320h]; Block                                         ; +0x28, 0x18006c518\ntest    rcx, rcx                                                       ; +0x2f, 0x18006c51f\njz      short loc_18006C531                                            ; +0x32, 0x18006c522\ncall    cs:__imp_free                                                  ; +0x34, 0x18006c524\nmov     [rbx+320h], rdi                                                ; +0x3a, 0x18006c52a\nmov     eax, [rbx+29Ch]                                                ; +0x41, 0x18006c531\nlea     rcx, [rax+rax*2]                                               ; +0x47, 0x18006c537\nshl     rcx, 5; Size                                                   ; +0x4b, 0x18006c53b\ncall    cs:__imp_malloc                                                ; +0x4f, 0x18006c53f\nmov     [rbx+318h], rax                                                ; +0x55, 0x18006c545\nmov     eax, [rbx+29Ch]                                                ; +0x5c, 0x18006c54c\nlea     ecx, [rax+rax*2]                                               ; +0x62, 0x18006c552\nadd     ecx, ecx                                                       ; +0x65, 0x18006c555\nadd     rcx, rcx; Size                                                 ; +0x67, 0x18006c557\ncall    cs:__imp_malloc                                                ; +0x6a, 0x18006c55a\nmov     rcx, [rbx+318h]; void *                                        ; +0x70, 0x18006c560\nmov     [rbx+320h], rax                                                ; +0x77, 0x18006c567\ntest    rcx, rcx                                                       ; +0x7e, 0x18006c56e\njz      short loc_18006C5C5                                            ; +0x81, 0x18006c571\ntest    rax, rax                                                       ; +0x83, 0x18006c573\njz      short loc_18006C5B8                                            ; +0x86, 0x18006c576\nmov     eax, [rbx+29Ch]                                                ; +0x88, 0x18006c578\nxor     edx, edx; Val                                                  ; +0x8e, 0x18006c57e\nlea     r8, [rax+rax*2]                                                ; +0x90, 0x18006c580\nshl     r8, 5; Size                                                    ; +0x94, 0x18006c584\ncall    memset                                                         ; +0x98, 0x18006c588\nmov     eax, [rbx+29Ch]                                                ; +0x9d, 0x18006c58d\nxor     edx, edx; Val                                                  ; +0xa3, 0x18006c593\nlea     ecx, [rax+rax*2]                                               ; +0xa5, 0x18006c595\nlea     r8d, [rcx+rcx]                                                 ; +0xa8, 0x18006c598\nmov     rcx, [rbx+320h]; void *                                        ; +0xac, 0x18006c59c\nadd     r8, r8; Size                                                   ; +0xb3, 0x18006c5a3\ncall    memset                                                         ; +0xb6, 0x18006c5a6\nmov     al, 1                                                          ; +0xbb, 0x18006c5ab\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbd, 0x18006c5ad\nadd     rsp, 20h                                                       ; +0xc2, 0x18006c5b2\npop     rdi                                                            ; +0xc6, 0x18006c5b6\nretn                                                                   ; +0xc7, 0x18006c5b7\ncall    cs:__imp_free                                                  ; +0xc8, 0x18006c5b8\nmov     [rbx+318h], rdi                                                ; +0xce, 0x18006c5be\nmov     rcx, [rbx+320h]; Block                                         ; +0xd5, 0x18006c5c5\ntest    rcx, rcx                                                       ; +0xdc, 0x18006c5cc\njz      short loc_18006C5DE                                            ; +0xdf, 0x18006c5cf\ncall    cs:__imp_free                                                  ; +0xe1, 0x18006c5d1\nmov     [rbx+320h], rdi                                                ; +0xe7, 0x18006c5d7\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xee, 0x18006c5de\nxor     al, al                                                         ; +0xf3, 0x18006c5e3\nadd     rsp, 20h                                                       ; +0xf5, 0x18006c5e5\npop     rdi                                                            ; +0xf9, 0x18006c5e9\nretn                                                                   ; +0xfa, 0x18006c5ea", "xrefs": ["cocos2d::CCParticleSystemQuad::initWithTotalParticles @ 0x18006cbd5", "cocos2d::CCParticleSystemQuad::setBatchNode @ 0x18006cce7", "<???> @ 0x18014cf68", "<???> @ 0x1801bdfe4"], "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"}