{"type": "func", "start": 6442870928, "end": 6442871466, "name": "cocos2d::CCParticleGalaxy::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleGalaxy::initWithTotalParticles from 0x180066890 to 0x180066aaa (538 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180065997\n// > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180065986\n// > <???> @ 0x1801025f8\n// > <???> @ 0x180142f3c\n// > <???> @ 0x180142f4c\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bdd80\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:53 +0000\n// \n\nchar __fastcall cocos2d::CCParticleGalaxy::initWithTotalParticles(cocos2d::CCParticleGalaxy *this, unsigned int a2)\n{\n  __int64 v3; // rax\n  __int64 v4; // rbx\n  float *v5; // rax\n  struct cocos2d::CCDirector *v6; // rax\n  __int64 v7; // rbx\n  float *v8; // rax\n  int v9; // eax\n  struct cocos2d::CCTexture2D *v10; // rax\n  __int64 v11; // rdx\n  float v13; // [rsp+40h] [rbp+18h] BYREF\n  float v14; // [rsp+44h] [rbp+1Ch]\n  float v15; // [rsp+48h] [rbp+20h] BYREF\n\n  if ( !cocos2d::CCParticleSystemQuad::initWithTotalParticles(this, a2, 0) )\n    return 0;\n  v3 = *(_QWORD *)this;\n  *((_DWORD *)this + 117) = -1082130432;\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *, _QWORD))(v3 + 1560))(this, 0);\n  v4 = *(_QWORD *)this;\n  v5 = kmVec2Fill(&v15, 0.0, 0.0);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *, float *))(v4 + 1040))(this, v5);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *))(*(_QWORD *)this + 1056LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *))(*(_QWORD *)this + 1072LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *))(*(_QWORD *)this + 1120LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *))(*(_QWORD *)this + 1136LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *))(*(_QWORD *)this + 1088LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *))(*(_QWORD *)this + 1104LL))(this);\n  *((_DWORD *)this + 124) = 1119092736;\n  *((_DWORD *)this + 125) = 1135869952;\n  v6 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v6, &v13);\n  v7 = *(_QWORD *)this;\n  v8 = kmVec2Fill(&v15, v13 * 0.5, v14 * 0.5);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *, float *))(v7 + 184))(this, v8);\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *, void *))(*(_QWORD *)this + 952LL))(this, &unk_1801B2448);\n  v9 = *((_DWORD *)this + 167);\n  *((_DWORD *)this + 122) = 1082130432;\n  *((_DWORD *)this + 123) = 1065353216;\n  *((_DWORD *)this + 142) = 1108606976;\n  *((_DWORD *)this + 143) = 1092616192;\n  *((_DWORD *)this + 144) = -1082130432;\n  *((_DWORD *)this + 146) = 1039516303;\n  *((_DWORD *)this + 147) = 1048576000;\n  *((_DWORD *)this + 148) = 1061326684;\n  *(_QWORD *)((char *)this + 596) = 1065353216;\n  *(_QWORD *)((char *)this + 604) = 0;\n  *(_QWORD *)((char *)this + 612) = 0;\n  *(_QWORD *)((char *)this + 620) = 0;\n  *((float *)this + 166) = (float)v9 * 0.25;\n  *(_QWORD *)((char *)this + 628) = 1065353216;\n  *(_QWORD *)((char *)this + 636) = 0;\n  *((_DWORD *)this + 161) = 0;\n  v10 = sub_180065EE0();\n  if ( v10 )\n    (*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(*((_QWORD *)this + 40) + 24LL))(\n      (char *)this + 320,\n      v10);\n  LOBYTE(v11) = 1;\n  (*(void (__fastcall **)(cocos2d::CCParticleGalaxy *, __int64))(*(_QWORD *)this + 1272LL))(this, v11);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleGalaxy::initWithTotalParticles from 0x180066890 to 0x180066aaa (538 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180065997\n; > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180065986\n; > <???> @ 0x1801025f8\n; > <???> @ 0x180142f3c\n; > <???> @ 0x180142f4c\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bdd80\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:53 +0000\n; \npush    rdi                                                            ; +0x0, 0x180066890\nsub     rsp, 20h                                                       ; +0x2, 0x180066892\nxor     r8d, r8d; bool                                                 ; +0x6, 0x180066896\nmov     rdi, rcx                                                       ; +0x9, 0x180066899\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x18006689c\ntest    al, al                                                         ; +0x11, 0x1800668a1\njz      loc_180066AA2                                                  ; +0x13, 0x1800668a3\nmov     rax, [rdi]                                                     ; +0x19, 0x1800668a9\nxor     edx, edx                                                       ; +0x1c, 0x1800668ac\nmov     rcx, rdi                                                       ; +0x1e, 0x1800668ae\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x1800668b1\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x26, 0x1800668b6\ncall    qword ptr [rax+618h]                                           ; +0x30, 0x1800668c0\nmov     rbx, [rdi]                                                     ; +0x36, 0x1800668c6\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x39, 0x1800668c9\nxorps   xmm2, xmm2                                                     ; +0x3e, 0x1800668ce\nxorps   xmm1, xmm1                                                     ; +0x41, 0x1800668d1\ncall    kmVec2Fill                                                     ; +0x44, 0x1800668d4\nmov     rdx, rax                                                       ; +0x49, 0x1800668d9\nmov     rcx, rdi                                                       ; +0x4c, 0x1800668dc\ncall    qword ptr [rbx+410h]                                           ; +0x4f, 0x1800668df\nmov     rax, [rdi]                                                     ; +0x55, 0x1800668e5\nmov     rcx, rdi                                                       ; +0x58, 0x1800668e8\nmovss   xmm1, cs:dword_1801053D0                                       ; +0x5b, 0x1800668eb\ncall    qword ptr [rax+420h]                                           ; +0x63, 0x1800668f3\nmov     rax, [rdi]                                                     ; +0x69, 0x1800668f9\nmov     rcx, rdi                                                       ; +0x6c, 0x1800668fc\nmovss   xmm1, cs:dword_1800EE4B0                                       ; +0x6f, 0x1800668ff\ncall    qword ptr [rax+430h]                                           ; +0x77, 0x180066907\nmov     rax, [rdi]                                                     ; +0x7d, 0x18006690d\nmov     rcx, rdi                                                       ; +0x80, 0x180066910\nmovss   xmm1, cs:dword_1801053E8                                       ; +0x83, 0x180066913\ncall    qword ptr [rax+460h]                                           ; +0x8b, 0x18006691b\nmov     rax, [rdi]                                                     ; +0x91, 0x180066921\nxorps   xmm1, xmm1                                                     ; +0x94, 0x180066924\nmov     rcx, rdi                                                       ; +0x97, 0x180066927\ncall    qword ptr [rax+470h]                                           ; +0x9a, 0x18006692a\nmov     rax, [rdi]                                                     ; +0xa0, 0x180066930\nmov     rcx, rdi                                                       ; +0xa3, 0x180066933\nmovss   xmm1, cs:dword_1801053D8                                       ; +0xa6, 0x180066936\ncall    qword ptr [rax+440h]                                           ; +0xae, 0x18006693e\nmov     rax, [rdi]                                                     ; +0xb4, 0x180066944\nxorps   xmm1, xmm1                                                     ; +0xb7, 0x180066947\nmov     rcx, rdi                                                       ; +0xba, 0x18006694a\ncall    qword ptr [rax+450h]                                           ; +0xbd, 0x18006694d\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xc3, 0x180066953\nmov     dword ptr [rdi+1F4h], 43B40000h                                ; +0xcd, 0x18006695d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd7, 0x180066967\nmov     rcx, rax                                                       ; +0xdc, 0x18006696c\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xdf, 0x18006696f\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xe4, 0x180066974\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xe9, 0x180066979\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xef, 0x18006697f\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xf4, 0x180066984\nmulss   xmm2, cs:dword_1800EC358                                       ; +0xfa, 0x18006698a\nmov     rbx, [rdi]                                                     ; +0x102, 0x180066992\nmulss   xmm1, cs:dword_1800EC358                                       ; +0x105, 0x180066995\ncall    kmVec2Fill                                                     ; +0x10d, 0x18006699d\nmov     rdx, rax                                                       ; +0x112, 0x1800669a2\nmov     rcx, rdi                                                       ; +0x115, 0x1800669a5\ncall    qword ptr [rbx+0B8h]                                           ; +0x118, 0x1800669a8\nmov     rax, [rdi]                                                     ; +0x11e, 0x1800669ae\nlea     rdx, unk_1801B2448                                             ; +0x121, 0x1800669b1\nmov     rcx, rdi                                                       ; +0x128, 0x1800669b8\ncall    qword ptr [rax+3B8h]                                           ; +0x12b, 0x1800669bb\nmov     eax, [rdi+29Ch]                                                ; +0x131, 0x1800669c1\nxorps   xmm0, xmm0                                                     ; +0x137, 0x1800669c7\nmov     dword ptr [rdi+1E8h], 40800000h                                ; +0x13a, 0x1800669ca\nmov     dword ptr [rdi+1ECh], 3F800000h                                ; +0x144, 0x1800669d4\nmov     dword ptr [rdi+238h], 42140000h                                ; +0x14e, 0x1800669de\ncvtsi2ss xmm0, rax                                                     ; +0x158, 0x1800669e8\nxor     eax, eax                                                       ; +0x15d, 0x1800669ed\nmov     dword ptr [rdi+23Ch], 41200000h                                ; +0x15f, 0x1800669ef\nmov     dword ptr [rdi+240h], 0BF800000h                               ; +0x169, 0x1800669f9\nmov     dword ptr [rdi+248h], 3DF5C28Fh                                ; +0x173, 0x180066a03\nmov     dword ptr [rdi+24Ch], 3E800000h                                ; +0x17d, 0x180066a0d\nmov     dword ptr [rdi+250h], 3F428F5Ch                                ; +0x187, 0x180066a17\nmov     qword ptr [rdi+254h], 3F800000h                                ; +0x191, 0x180066a21\nmulss   xmm0, cs:dword_1800EE454                                       ; +0x19c, 0x180066a2c\nmov     [rdi+25Ch], rax                                                ; +0x1a4, 0x180066a34\nmov     [rdi+264h], rax                                                ; +0x1ab, 0x180066a3b\nmov     [rdi+26Ch], rax                                                ; +0x1b2, 0x180066a42\nmovss   dword ptr [rdi+298h], xmm0                                     ; +0x1b9, 0x180066a49\nmov     qword ptr [rdi+274h], 3F800000h                                ; +0x1c1, 0x180066a51\nmov     [rdi+27Ch], rax                                                ; +0x1cc, 0x180066a5c\nmov     [rdi+284h], eax                                                ; +0x1d3, 0x180066a63\ncall    sub_180065EE0                                                  ; +0x1d9, 0x180066a69\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1de, 0x180066a6e\ntest    rax, rax                                                       ; +0x1e3, 0x180066a73\njz      short loc_180066A8C                                            ; +0x1e6, 0x180066a76\nlea     rcx, [rdi+140h]                                                ; +0x1e8, 0x180066a78\nmov     rdx, [rcx]                                                     ; +0x1ef, 0x180066a7f\nmov     r8, [rdx+18h]                                                  ; +0x1f2, 0x180066a82\nmov     rdx, rax                                                       ; +0x1f6, 0x180066a86\ncall    r8                                                             ; +0x1f9, 0x180066a89\nmov     rax, [rdi]                                                     ; +0x1fc, 0x180066a8c\nmov     dl, 1                                                          ; +0x1ff, 0x180066a8f\nmov     rcx, rdi                                                       ; +0x201, 0x180066a91\ncall    qword ptr [rax+4F8h]                                           ; +0x204, 0x180066a94\nmov     al, 1                                                          ; +0x20a, 0x180066a9a\nadd     rsp, 20h                                                       ; +0x20c, 0x180066a9c\npop     rdi                                                            ; +0x210, 0x180066aa0\nretn                                                                   ; +0x211, 0x180066aa1\nxor     al, al                                                         ; +0x212, 0x180066aa2\nadd     rsp, 20h                                                       ; +0x214, 0x180066aa4\npop     rdi                                                            ; +0x218, 0x180066aa8\nretn                                                                   ; +0x219, 0x180066aa9", "xrefs": ["cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180065997", "cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x180065986", "<???> @ 0x1801025f8", "<???> @ 0x180142f3c", "<???> @ 0x180142f4c", "<???> @ 0x18014cf68", "<???> @ 0x1801bdd80"], "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"}