{"type": "func", "start": 6442895840, "end": 6442896316, "name": "cocos2d::CCParticleSystemQuad::initTexCoordsWithRect", "pseudocode": "// \n// cocos2d::CCParticleSystemQuad::initTexCoordsWithRect from 0x18006c9e0 to 0x18006cbbc (476 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCParticleSystemQuad::setTextureWithRect @ 0x18006cf1a\n// > cocos2d::CCParticleSystemQuad::setTotalParticles @ 0x18006d062\n// > cocos2d::CCParticleSystemQuad::updateTexCoords @ 0x18006d5b1\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801be02c\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\nvoid __fastcall cocos2d::CCParticleSystemQuad::initTexCoordsWithRect(\n        cocos2d::CCParticleSystemQuad *this,\n        const struct cocos2d::CCRect *a2)\n{\n  cocos2d::CCDirector *v4; // rax\n  float v5; // xmm9_4\n  cocos2d::CCDirector *v6; // rax\n  float ContentScaleFactor; // xmm0_4\n  float v8; // xmm6_4\n  float v9; // xmm8_4\n  cocos2d::CCDirector *v10; // rax\n  float v11; // xmm7_4\n  float v12; // xmm6_4\n  cocos2d::CCDirector *v13; // rax\n  float v14; // xmm0_4\n  __int64 v15; // rcx\n  float v16; // xmm7_4\n  float v17; // xmm0_4\n  __int64 v18; // rcx\n  float v19; // xmm8_4\n  float v20; // xmm6_4\n  float v21; // xmm9_4\n  float v22; // xmm7_4\n  __int64 v23; // r9\n  unsigned int v24; // r8d\n  unsigned int v25; // edx\n  float *v26; // rax\n  __int64 v27; // rcx\n  float v28; // [rsp+30h] [rbp-58h] BYREF\n  float v29; // [rsp+34h] [rbp-54h]\n  float v30; // [rsp+38h] [rbp-50h]\n  float v31; // [rsp+3Ch] [rbp-4Ch]\n\n  cocos2d::CCRect::operator=((__int64)this + 816, (__int64)a2);\n  v4 = cocos2d::CCDirector::sharedDirector();\n  v5 = cocos2d::CCDirector::getContentScaleFactor(v4) * *((float *)a2 + 3);\n  v6 = cocos2d::CCDirector::sharedDirector();\n  ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v6);\n  v8 = *((float *)a2 + 1);\n  v9 = ContentScaleFactor * *((float *)a2 + 2);\n  v10 = cocos2d::CCDirector::sharedDirector();\n  v11 = cocos2d::CCDirector::getContentScaleFactor(v10) * v8;\n  v12 = *(float *)a2;\n  v13 = cocos2d::CCDirector::sharedDirector();\n  v14 = cocos2d::CCDirector::getContentScaleFactor(v13) * v12;\n  cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v28, v14, v11, v9, v5);\n  v15 = *((_QWORD *)this + 84);\n  v16 = *((float *)a2 + 2);\n  v17 = *((float *)a2 + 3);\n  if ( v15 )\n  {\n    v16 = (float)(*(int (__fastcall **)(__int64))(*(_QWORD *)v15 + 80LL))(v15);\n    v17 = (float)(*(int (__fastcall **)(_QWORD))(**((_QWORD **)this + 84) + 88LL))(*((_QWORD *)this + 84));\n  }\n  v18 = *((_QWORD *)this + 55);\n  v19 = v28 / v16;\n  v20 = (float)(v30 / v16) + (float)(v28 / v16);\n  v21 = v29 / v17;\n  v22 = (float)(v31 / v17) + (float)(v29 / v17);\n  if ( v18 )\n  {\n    v23 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v18 + 328) + 104LL))(*(_QWORD *)(v18 + 328));\n    v24 = *((_DWORD *)this + 112);\n    v25 = v24 + *((_DWORD *)this + 167);\n  }\n  else\n  {\n    v23 = *((_QWORD *)this + 99);\n    v24 = 0;\n    v25 = *((_DWORD *)this + 167);\n  }\n  if ( v24 < v25 )\n  {\n    v26 = (float *)(v23 + 96LL * v24 + 44);\n    v27 = v25 - v24;\n    do\n    {\n      *(v26 - 1) = v19;\n      *v26 = v22;\n      v26[11] = v20;\n      v26[12] = v22;\n      *(v26 - 7) = v19;\n      *(v26 - 6) = v21;\n      v26[5] = v20;\n      v26[6] = v21;\n      v26 += 24;\n      --v27;\n    }\n    while ( v27 );\n  }\n}", "assembly": "; \n; cocos2d::CCParticleSystemQuad::initTexCoordsWithRect from 0x18006c9e0 to 0x18006cbbc (476 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCParticleSystemQuad::setTextureWithRect @ 0x18006cf1a\n; > cocos2d::CCParticleSystemQuad::setTotalParticles @ 0x18006d062\n; > cocos2d::CCParticleSystemQuad::updateTexCoords @ 0x18006d5b1\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801be02c\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, 0x18006c9e0\npush    rdi                                                            ; +0x5, 0x18006c9e5\nsub     rsp, 80h                                                       ; +0x6, 0x18006c9e6\nmovaps  [rsp+88h+var_18], xmm6                                         ; +0xd, 0x18006c9ed\nmov     rdi, rcx                                                       ; +0x12, 0x18006c9f2\nmovaps  [rsp+88h+var_28], xmm7                                         ; +0x15, 0x18006c9f5\nadd     rcx, 330h                                                      ; +0x1a, 0x18006c9fa\nmovaps  [rsp+88h+var_38], xmm8                                         ; +0x21, 0x18006ca01\nmov     rbx, rdx                                                       ; +0x27, 0x18006ca07\nmovaps  [rsp+88h+var_48], xmm9                                         ; +0x2a, 0x18006ca0a\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0x30, 0x18006ca10\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x35, 0x18006ca15\nmov     rcx, rax; this                                                 ; +0x3a, 0x18006ca1a\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x3d, 0x18006ca1d\nmovaps  xmm9, xmm0                                                     ; +0x42, 0x18006ca22\nmulss   xmm9, dword ptr [rbx+0Ch]                                      ; +0x46, 0x18006ca26\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x4c, 0x18006ca2c\nmov     rcx, rax; this                                                 ; +0x51, 0x18006ca31\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x54, 0x18006ca34\nmovss   xmm6, dword ptr [rbx+4]                                        ; +0x59, 0x18006ca39\nmovaps  xmm8, xmm0                                                     ; +0x5e, 0x18006ca3e\nmulss   xmm8, dword ptr [rbx+8]                                        ; +0x62, 0x18006ca42\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x68, 0x18006ca48\nmov     rcx, rax; this                                                 ; +0x6d, 0x18006ca4d\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x70, 0x18006ca50\nmovaps  xmm7, xmm0                                                     ; +0x75, 0x18006ca55\nmulss   xmm7, xmm6                                                     ; +0x78, 0x18006ca58\nmovss   xmm6, dword ptr [rbx]                                          ; +0x7c, 0x18006ca5c\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x80, 0x18006ca60\nmov     rcx, rax; this                                                 ; +0x85, 0x18006ca65\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x88, 0x18006ca68\nmulss   xmm0, xmm6                                                     ; +0x8d, 0x18006ca6d\nlea     rcx, [rsp+88h+var_58]; this                                    ; +0x91, 0x18006ca71\nmovaps  xmm3, xmm8; float                                              ; +0x96, 0x18006ca76\nmovss   [rsp+88h+var_68], xmm9; float                                  ; +0x9a, 0x18006ca7a\nmovaps  xmm2, xmm7; float                                              ; +0xa1, 0x18006ca81\nmovaps  xmm1, xmm0; float                                              ; +0xa4, 0x18006ca84\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0xa7, 0x18006ca87\nmov     rcx, [rdi+2A0h]                                                ; +0xac, 0x18006ca8c\nmovss   xmm7, dword ptr [rbx+8]                                        ; +0xb3, 0x18006ca93\nmovss   xmm0, dword ptr [rbx+0Ch]                                      ; +0xb8, 0x18006ca98\ntest    rcx, rcx                                                       ; +0xbd, 0x18006ca9d\njz      short loc_18006CAC9                                            ; +0xc0, 0x18006caa0\nmov     rax, [rcx]                                                     ; +0xc2, 0x18006caa2\ncall    qword ptr [rax+50h]                                            ; +0xc5, 0x18006caa5\nmov     rcx, [rdi+2A0h]                                                ; +0xc8, 0x18006caa8\nxorps   xmm7, xmm7                                                     ; +0xcf, 0x18006caaf\nmov     eax, eax                                                       ; +0xd2, 0x18006cab2\ncvtsi2ss xmm7, rax                                                     ; +0xd4, 0x18006cab4\nmov     rax, [rcx]                                                     ; +0xd9, 0x18006cab9\ncall    qword ptr [rax+58h]                                            ; +0xdc, 0x18006cabc\nmov     eax, eax                                                       ; +0xdf, 0x18006cabf\nxorps   xmm0, xmm0                                                     ; +0xe1, 0x18006cac1\ncvtsi2ss xmm0, rax                                                     ; +0xe4, 0x18006cac4\nmovss   xmm8, [rsp+88h+var_58]                                         ; +0xe9, 0x18006cac9\nmovss   xmm6, [rsp+88h+var_50]                                         ; +0xf0, 0x18006cad0\nmovss   xmm9, [rsp+88h+var_54]                                         ; +0xf6, 0x18006cad6\nmov     rcx, [rdi+1B8h]                                                ; +0xfd, 0x18006cadd\ndivss   xmm8, xmm7                                                     ; +0x104, 0x18006cae4\ndivss   xmm6, xmm7                                                     ; +0x109, 0x18006cae9\nmovss   xmm7, [rsp+88h+var_4C]                                         ; +0x10d, 0x18006caed\naddss   xmm6, xmm8                                                     ; +0x113, 0x18006caf3\ndivss   xmm7, xmm0                                                     ; +0x118, 0x18006caf8\ndivss   xmm9, xmm0                                                     ; +0x11c, 0x18006cafc\naddss   xmm7, xmm9                                                     ; +0x121, 0x18006cb01\ntest    rcx, rcx                                                       ; +0x126, 0x18006cb06\njz      short loc_18006CB2D                                            ; +0x129, 0x18006cb09\nmov     rcx, [rcx+148h]                                                ; +0x12b, 0x18006cb0b\nmov     rax, [rcx]                                                     ; +0x132, 0x18006cb12\ncall    qword ptr [rax+68h]                                            ; +0x135, 0x18006cb15\nmov     edx, [rdi+29Ch]                                                ; +0x138, 0x18006cb18\nmov     r9, rax                                                        ; +0x13e, 0x18006cb1e\nmov     r8d, [rdi+1C0h]                                                ; +0x141, 0x18006cb21\nadd     edx, r8d                                                       ; +0x148, 0x18006cb28\njmp     short loc_18006CB3D                                            ; +0x14b, 0x18006cb2b\nmov     r9, [rdi+318h]                                                 ; +0x14d, 0x18006cb2d\nxor     r8d, r8d                                                       ; +0x154, 0x18006cb34\nmov     edx, [rdi+29Ch]                                                ; +0x157, 0x18006cb37\ncmp     r8d, edx                                                       ; +0x15d, 0x18006cb3d\njnb     short loc_18006CB95                                            ; +0x160, 0x18006cb40\nmov     eax, r8d                                                       ; +0x162, 0x18006cb42\nlea     rax, [rax+rax*2]                                               ; +0x165, 0x18006cb45\nshl     rax, 5                                                         ; +0x169, 0x18006cb49\nadd     rax, 2Ch ; ','                                                 ; +0x16d, 0x18006cb4d\nadd     rax, r9                                                        ; +0x171, 0x18006cb51\nsub     edx, r8d                                                       ; +0x174, 0x18006cb54\nmov     ecx, edx                                                       ; +0x177, 0x18006cb57\nnop     dword ptr [rax+00000000h]                                      ; +0x179, 0x18006cb59\nmovss   dword ptr [rax-4], xmm8                                        ; +0x180, 0x18006cb60\nmovss   dword ptr [rax], xmm7                                          ; +0x186, 0x18006cb66\nmovss   dword ptr [rax+2Ch], xmm6                                      ; +0x18a, 0x18006cb6a\nmovss   dword ptr [rax+30h], xmm7                                      ; +0x18f, 0x18006cb6f\nmovss   dword ptr [rax-1Ch], xmm8                                      ; +0x194, 0x18006cb74\nmovss   dword ptr [rax-18h], xmm9                                      ; +0x19a, 0x18006cb7a\nmovss   dword ptr [rax+14h], xmm6                                      ; +0x1a0, 0x18006cb80\nmovss   dword ptr [rax+18h], xmm9                                      ; +0x1a5, 0x18006cb85\nlea     rax, [rax+60h]                                                 ; +0x1ab, 0x18006cb8b\nsub     rcx, 1                                                         ; +0x1af, 0x18006cb8f\njnz     short loc_18006CB60                                            ; +0x1b3, 0x18006cb93\nmov     rbx, [rsp+88h+arg_0]                                           ; +0x1b5, 0x18006cb95\nmovaps  xmm6, [rsp+88h+var_18]                                         ; +0x1bd, 0x18006cb9d\nmovaps  xmm7, [rsp+88h+var_28]                                         ; +0x1c2, 0x18006cba2\nmovaps  xmm8, [rsp+88h+var_38]                                         ; +0x1c7, 0x18006cba7\nmovaps  xmm9, [rsp+88h+var_48]                                         ; +0x1cd, 0x18006cbad\nadd     rsp, 80h                                                       ; +0x1d3, 0x18006cbb3\npop     rdi                                                            ; +0x1da, 0x18006cbba\nretn                                                                   ; +0x1db, 0x18006cbbb", "xrefs": ["cocos2d::CCParticleSystemQuad::setTextureWithRect @ 0x18006cf1a", "cocos2d::CCParticleSystemQuad::setTotalParticles @ 0x18006d062", "cocos2d::CCParticleSystemQuad::updateTexCoords @ 0x18006d5b1", "<???> @ 0x18014cf68", "<???> @ 0x1801be02c"], "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"}