{"type": "func", "start": 6442874272, "end": 6442874762, "name": "cocos2d::CCParticleSun::initWithTotalParticles", "pseudocode": "// \n// cocos2d::CCParticleSun::initWithTotalParticles from 0x1800675a0 to 0x18006778a (490 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180065e77\n// > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180065e66\n// > <???> @ 0x180101f78\n// > <???> @ 0x180142f18\n// > <???> @ 0x180142f28\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bde58\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::CCParticleSun::initWithTotalParticles(cocos2d::CCParticleSun *this, unsigned int a2)\n{\n  __int64 v3; // rdx\n  __int64 v4; // rax\n  __int64 v5; // rbx\n  float *v6; // rax\n  struct cocos2d::CCDirector *v7; // rax\n  __int64 v8; // rbx\n  float *v9; // rax\n  int v10; // eax\n  struct cocos2d::CCTexture2D *v11; // rax\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  LOBYTE(v3) = 1;\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *, __int64))(*(_QWORD *)this + 1272LL))(this, v3);\n  v4 = *(_QWORD *)this;\n  *((_DWORD *)this + 117) = -1082130432;\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *, _QWORD))(v4 + 1560))(this, 0);\n  v5 = *(_QWORD *)this;\n  v6 = kmVec2Fill(&v15, 0.0, 0.0);\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *, float *))(v5 + 1040))(this, v6);\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *))(*(_QWORD *)this + 1120LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *))(*(_QWORD *)this + 1136LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *))(*(_QWORD *)this + 1056LL))(this);\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *))(*(_QWORD *)this + 1072LL))(this);\n  *((_DWORD *)this + 124) = 1119092736;\n  *((_DWORD *)this + 125) = 1135869952;\n  v7 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v7, &v13);\n  v8 = *(_QWORD *)this;\n  v9 = kmVec2Fill(&v15, v13 * 0.5, v14 * 0.5);\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *, float *))(v8 + 184))(this, v9);\n  (*(void (__fastcall **)(cocos2d::CCParticleSun *, void *))(*(_QWORD *)this + 952LL))(this, &unk_1801B2448);\n  v10 = *((_DWORD *)this + 167);\n  *((_DWORD *)this + 122) = 1065353216;\n  *((_DWORD *)this + 123) = 1056964608;\n  *((_DWORD *)this + 142) = 1106247680;\n  *((_DWORD *)this + 143) = 1092616192;\n  *((_DWORD *)this + 144) = -1082130432;\n  *((_DWORD *)this + 146) = 1061326684;\n  *((_DWORD *)this + 147) = 1048576000;\n  *((_DWORD *)this + 148) = 1039516303;\n  *(_QWORD *)((char *)this + 596) = 1065353216;\n  *((float *)this + 166) = (float)v10;\n  *(_QWORD *)((char *)this + 604) = 0;\n  *(_QWORD *)((char *)this + 612) = 0;\n  *(_QWORD *)((char *)this + 620) = 0;\n  *(_QWORD *)((char *)this + 628) = 1065353216;\n  *(_QWORD *)((char *)this + 636) = 0;\n  *((_DWORD *)this + 161) = 0;\n  v11 = sub_180065EE0();\n  if ( v11 )\n    (*(void (__fastcall **)(char *, struct cocos2d::CCTexture2D *))(*((_QWORD *)this + 40) + 24LL))(\n      (char *)this + 320,\n      v11);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCParticleSun::initWithTotalParticles from 0x1800675a0 to 0x18006778a (490 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180065e77\n; > cocos2d::CCParticleSun::createWithTotalParticles @ 0x180065e66\n; > <???> @ 0x180101f78\n; > <???> @ 0x180142f18\n; > <???> @ 0x180142f28\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bde58\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, 0x1800675a0\nsub     rsp, 20h                                                       ; +0x2, 0x1800675a2\nxor     r8d, r8d; bool                                                 ; +0x6, 0x1800675a6\nmov     rdi, rcx                                                       ; +0x9, 0x1800675a9\ncall    ?initWithTotalParticles@CCParticleSystemQuad@cocos2d@@UEAA_NI_N@Z; cocos2d::CCParticleSystemQuad::initWithTotalParticles(uint,bool) ; +0xc, 0x1800675ac\ntest    al, al                                                         ; +0x11, 0x1800675b1\njz      loc_180067782                                                  ; +0x13, 0x1800675b3\nmov     rax, [rdi]                                                     ; +0x19, 0x1800675b9\nmov     dl, 1                                                          ; +0x1c, 0x1800675bc\nmov     rcx, rdi                                                       ; +0x1e, 0x1800675be\nmov     [rsp+28h+arg_0], rbx                                           ; +0x21, 0x1800675c1\ncall    qword ptr [rax+4F8h]                                           ; +0x26, 0x1800675c6\nmov     rax, [rdi]                                                     ; +0x2c, 0x1800675cc\nxor     edx, edx                                                       ; +0x2f, 0x1800675cf\nmov     rcx, rdi                                                       ; +0x31, 0x1800675d1\nmov     dword ptr [rdi+1D4h], 0BF800000h                               ; +0x34, 0x1800675d4\ncall    qword ptr [rax+618h]                                           ; +0x3e, 0x1800675de\nmov     rbx, [rdi]                                                     ; +0x44, 0x1800675e4\nlea     rcx, [rsp+28h+arg_18]                                          ; +0x47, 0x1800675e7\nxorps   xmm2, xmm2                                                     ; +0x4c, 0x1800675ec\nxorps   xmm1, xmm1                                                     ; +0x4f, 0x1800675ef\ncall    kmVec2Fill                                                     ; +0x52, 0x1800675f2\nmov     rdx, rax                                                       ; +0x57, 0x1800675f7\nmov     rcx, rdi                                                       ; +0x5a, 0x1800675fa\ncall    qword ptr [rbx+410h]                                           ; +0x5d, 0x1800675fd\nmov     rax, [rdi]                                                     ; +0x63, 0x180067603\nxorps   xmm1, xmm1                                                     ; +0x66, 0x180067606\nmov     rcx, rdi                                                       ; +0x69, 0x180067609\ncall    qword ptr [rax+460h]                                           ; +0x6c, 0x18006760c\nmov     rax, [rdi]                                                     ; +0x72, 0x180067612\nxorps   xmm1, xmm1                                                     ; +0x75, 0x180067615\nmov     rcx, rdi                                                       ; +0x78, 0x180067618\ncall    qword ptr [rax+470h]                                           ; +0x7b, 0x18006761b\nmov     rax, [rdi]                                                     ; +0x81, 0x180067621\nmov     rcx, rdi                                                       ; +0x84, 0x180067624\nmovss   xmm1, cs:dword_1801053C0                                       ; +0x87, 0x180067627\ncall    qword ptr [rax+420h]                                           ; +0x8f, 0x18006762f\nmov     rax, [rdi]                                                     ; +0x95, 0x180067635\nmov     rcx, rdi                                                       ; +0x98, 0x180067638\nmovss   xmm1, cs:flt_1800FD6A8                                         ; +0x9b, 0x18006763b\ncall    qword ptr [rax+430h]                                           ; +0xa3, 0x180067643\nmov     dword ptr [rdi+1F0h], 42B40000h                                ; +0xa9, 0x180067649\nmov     dword ptr [rdi+1F4h], 43B40000h                                ; +0xb3, 0x180067653\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xbd, 0x18006765d\nmov     rcx, rax                                                       ; +0xc2, 0x180067662\nlea     rdx, [rsp+28h+arg_10]                                          ; +0xc5, 0x180067665\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0xca, 0x18006766a\nmovss   xmm2, [rsp+28h+arg_14]                                         ; +0xcf, 0x18006766f\nlea     rcx, [rsp+28h+arg_18]                                          ; +0xd5, 0x180067675\nmovss   xmm1, [rsp+28h+arg_10]                                         ; +0xda, 0x18006767a\nmulss   xmm2, cs:dword_1800EC358                                       ; +0xe0, 0x180067680\nmov     rbx, [rdi]                                                     ; +0xe8, 0x180067688\nmulss   xmm1, cs:dword_1800EC358                                       ; +0xeb, 0x18006768b\ncall    kmVec2Fill                                                     ; +0xf3, 0x180067693\nmov     rdx, rax                                                       ; +0xf8, 0x180067698\nmov     rcx, rdi                                                       ; +0xfb, 0x18006769b\ncall    qword ptr [rbx+0B8h]                                           ; +0xfe, 0x18006769e\nmov     rax, [rdi]                                                     ; +0x104, 0x1800676a4\nlea     rdx, unk_1801B2448                                             ; +0x107, 0x1800676a7\nmov     rcx, rdi                                                       ; +0x10e, 0x1800676ae\ncall    qword ptr [rax+3B8h]                                           ; +0x111, 0x1800676b1\nmov     eax, [rdi+29Ch]                                                ; +0x117, 0x1800676b7\nxorps   xmm0, xmm0                                                     ; +0x11d, 0x1800676bd\nmov     dword ptr [rdi+1E8h], 3F800000h                                ; +0x120, 0x1800676c0\nmov     dword ptr [rdi+1ECh], 3F000000h                                ; +0x12a, 0x1800676ca\nmov     dword ptr [rdi+238h], 41F00000h                                ; +0x134, 0x1800676d4\ncvtsi2ss xmm0, rax                                                     ; +0x13e, 0x1800676de\nxor     eax, eax                                                       ; +0x143, 0x1800676e3\nmov     dword ptr [rdi+23Ch], 41200000h                                ; +0x145, 0x1800676e5\nmov     dword ptr [rdi+240h], 0BF800000h                               ; +0x14f, 0x1800676ef\nmov     dword ptr [rdi+248h], 3F428F5Ch                                ; +0x159, 0x1800676f9\nmov     dword ptr [rdi+24Ch], 3E800000h                                ; +0x163, 0x180067703\nmov     dword ptr [rdi+250h], 3DF5C28Fh                                ; +0x16d, 0x18006770d\nmov     qword ptr [rdi+254h], 3F800000h                                ; +0x177, 0x180067717\nmovss   dword ptr [rdi+298h], xmm0                                     ; +0x182, 0x180067722\nmov     [rdi+25Ch], rax                                                ; +0x18a, 0x18006772a\nmov     [rdi+264h], rax                                                ; +0x191, 0x180067731\nmov     [rdi+26Ch], rax                                                ; +0x198, 0x180067738\nmov     qword ptr [rdi+274h], 3F800000h                                ; +0x19f, 0x18006773f\nmov     [rdi+27Ch], rax                                                ; +0x1aa, 0x18006774a\nmov     [rdi+284h], eax                                                ; +0x1b1, 0x180067751\ncall    sub_180065EE0                                                  ; +0x1b7, 0x180067757\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x1bc, 0x18006775c\ntest    rax, rax                                                       ; +0x1c1, 0x180067761\njz      short loc_18006777A                                            ; +0x1c4, 0x180067764\nlea     rcx, [rdi+140h]                                                ; +0x1c6, 0x180067766\nmov     rdx, [rcx]                                                     ; +0x1cd, 0x18006776d\nmov     r8, [rdx+18h]                                                  ; +0x1d0, 0x180067770\nmov     rdx, rax                                                       ; +0x1d4, 0x180067774\ncall    r8                                                             ; +0x1d7, 0x180067777\nmov     al, 1                                                          ; +0x1da, 0x18006777a\nadd     rsp, 20h                                                       ; +0x1dc, 0x18006777c\npop     rdi                                                            ; +0x1e0, 0x180067780\nretn                                                                   ; +0x1e1, 0x180067781\nxor     al, al                                                         ; +0x1e2, 0x180067782\nadd     rsp, 20h                                                       ; +0x1e4, 0x180067784\npop     rdi                                                            ; +0x1e8, 0x180067788\nretn                                                                   ; +0x1e9, 0x180067789", "xrefs": ["cocos2d::CCParticleSun::createWithTotalParticles @ 0x180065e77", "cocos2d::CCParticleSun::createWithTotalParticles @ 0x180065e66", "<???> @ 0x180101f78", "<???> @ 0x180142f18", "<???> @ 0x180142f28", "<???> @ 0x18014cf68", "<???> @ 0x1801bde58"], "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"}