{"type": "func", "start": 6443040224, "end": 6443040804, "name": "cocos2d::CCSprite::setTextureCoords", "pseudocode": "// \n// cocos2d::CCSprite::setTextureCoords from 0x18008fde0 to 0x180090024 (580 bytes)\n// \n// 7 xrefs:\n// > <???> @ 0x1800f1d90\n// > <???> @ 0x1800f2278\n// > <???> @ 0x1800f2e28\n// > <???> @ 0x18010a268\n// > <???> @ 0x18010d280\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c00f0\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:22:07 +0000\n// \n\nvoid __fastcall cocos2d::CCSprite::setTextureCoords(cocos2d::CCSprite *this, const struct cocos2d::CCRect *a2)\n{\n  float v3; // xmm6_4\n  cocos2d::CCDirector *v5; // rax\n  float v6; // xmm9_4\n  float v7; // xmm6_4\n  cocos2d::CCDirector *v8; // rax\n  float v9; // xmm8_4\n  float v10; // xmm6_4\n  cocos2d::CCDirector *v11; // rax\n  float v12; // xmm7_4\n  float v13; // xmm6_4\n  cocos2d::CCDirector *v14; // rax\n  float v15; // xmm0_4\n  __int64 v16; // rbx\n  float v17; // xmm6_4\n  int v18; // eax\n  float v19; // xmm3_4\n  float v20; // xmm5_4\n  char v21; // al\n  float v22; // xmm4_4\n  float v23; // xmm1_4\n  float v24; // xmm2_4\n  float v25; // xmm0_4\n  float v26; // xmm5_4\n  float v27; // xmm6_4\n  float v28; // xmm7_4\n  float v29; // [rsp+30h] [rbp-58h] BYREF\n  float v30; // [rsp+34h] [rbp-54h]\n  float v31; // [rsp+38h] [rbp-50h]\n  float v32; // [rsp+3Ch] [rbp-4Ch]\n\n  v3 = *((float *)a2 + 3);\n  v5 = cocos2d::CCDirector::sharedDirector();\n  v6 = cocos2d::CCDirector::getContentScaleFactor(v5) * v3;\n  v7 = *((float *)a2 + 2);\n  v8 = cocos2d::CCDirector::sharedDirector();\n  v9 = cocos2d::CCDirector::getContentScaleFactor(v8) * v7;\n  v10 = *((float *)a2 + 1);\n  v11 = cocos2d::CCDirector::sharedDirector();\n  v12 = cocos2d::CCDirector::getContentScaleFactor(v11) * v10;\n  v13 = *(float *)a2;\n  v14 = cocos2d::CCDirector::sharedDirector();\n  v15 = cocos2d::CCDirector::getContentScaleFactor(v14) * v13;\n  cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v29, v15, v12, v9, v6);\n  if ( *((_QWORD *)this + 46) )\n    v16 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 44) + 88LL))(*((_QWORD *)this + 44));\n  else\n    v16 = *((_QWORD *)this + 52);\n  if ( v16 )\n  {\n    v17 = (float)(*(int (__fastcall **)(__int64))(*(_QWORD *)v16 + 80LL))(v16);\n    v18 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 88LL))(v16);\n    v19 = v29 / v17;\n    v20 = (float)v18;\n    v21 = *((_BYTE *)this + 557);\n    if ( *((_BYTE *)this + 440) )\n    {\n      v22 = v30 / v20;\n      v23 = (float)(v31 + v30) / v20;\n      v24 = (float)(v32 + v29) / v17;\n      if ( v21 )\n      {\n        v22 = (float)(v31 + v30) / v20;\n        v23 = v30 / v20;\n      }\n      if ( *((_BYTE *)this + 558) )\n      {\n        v19 = (float)(v32 + v29) / v17;\n        v24 = v29 / v17;\n      }\n      v25 = v23;\n      v26 = v24;\n      v27 = v19;\n      v28 = v22;\n    }\n    else\n    {\n      v22 = v30 / v20;\n      v23 = (float)(v30 + v32) / v20;\n      v24 = (float)(v31 + v29) / v17;\n      if ( v21 )\n      {\n        v19 = (float)(v31 + v29) / v17;\n        v24 = v29 / v17;\n      }\n      if ( *((_BYTE *)this + 558) )\n      {\n        v22 = (float)(v30 + v32) / v20;\n        v23 = v30 / v20;\n      }\n      v25 = v22;\n      v26 = v19;\n      v27 = v24;\n      v28 = v23;\n    }\n    *((float *)this + 125) = v19;\n    *((float *)this + 126) = v28;\n    *((float *)this + 137) = v27;\n    *((float *)this + 138) = v23;\n    *((float *)this + 119) = v26;\n    *((float *)this + 120) = v22;\n    *((float *)this + 131) = v24;\n    *((float *)this + 132) = v25;\n    *((float *)this + 145) = v19;\n    *((float *)this + 146) = v24;\n    *((float *)this + 147) = v23;\n    *((float *)this + 148) = v22;\n  }\n}", "assembly": "; \n; cocos2d::CCSprite::setTextureCoords from 0x18008fde0 to 0x180090024 (580 bytes)\n; \n; 7 xrefs:\n; > <???> @ 0x1800f1d90\n; > <???> @ 0x1800f2278\n; > <???> @ 0x1800f2e28\n; > <???> @ 0x18010a268\n; > <???> @ 0x18010d280\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c00f0\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:22:07 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x18008fde0\npush    rdi                                                            ; +0x5, 0x18008fde5\nsub     rsp, 80h                                                       ; +0x6, 0x18008fde6\nmovaps  [rsp+88h+var_18], xmm6                                         ; +0xd, 0x18008fded\nmov     rbx, rdx                                                       ; +0x12, 0x18008fdf2\nmovss   xmm6, dword ptr [rdx+0Ch]                                      ; +0x15, 0x18008fdf5\nmov     rdi, rcx                                                       ; +0x1a, 0x18008fdfa\nmovaps  [rsp+88h+var_28], xmm7                                         ; +0x1d, 0x18008fdfd\nmovaps  [rsp+88h+var_38], xmm8                                         ; +0x22, 0x18008fe02\nmovaps  [rsp+88h+var_48], xmm9                                         ; +0x28, 0x18008fe08\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x2e, 0x18008fe0e\nmov     rcx, rax; this                                                 ; +0x33, 0x18008fe13\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x36, 0x18008fe16\nmovaps  xmm9, xmm0                                                     ; +0x3b, 0x18008fe1b\nmulss   xmm9, xmm6                                                     ; +0x3f, 0x18008fe1f\nmovss   xmm6, dword ptr [rbx+8]                                        ; +0x44, 0x18008fe24\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x49, 0x18008fe29\nmov     rcx, rax; this                                                 ; +0x4e, 0x18008fe2e\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x51, 0x18008fe31\nmovaps  xmm8, xmm0                                                     ; +0x56, 0x18008fe36\nmulss   xmm8, xmm6                                                     ; +0x5a, 0x18008fe3a\nmovss   xmm6, dword ptr [rbx+4]                                        ; +0x5f, 0x18008fe3f\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x64, 0x18008fe44\nmov     rcx, rax; this                                                 ; +0x69, 0x18008fe49\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x6c, 0x18008fe4c\nmovaps  xmm7, xmm0                                                     ; +0x71, 0x18008fe51\nmulss   xmm7, xmm6                                                     ; +0x74, 0x18008fe54\nmovss   xmm6, dword ptr [rbx]                                          ; +0x78, 0x18008fe58\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x7c, 0x18008fe5c\nmov     rcx, rax; this                                                 ; +0x81, 0x18008fe61\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x84, 0x18008fe64\nmulss   xmm0, xmm6                                                     ; +0x89, 0x18008fe69\nlea     rcx, [rsp+88h+var_58]; this                                    ; +0x8d, 0x18008fe6d\nmovaps  xmm3, xmm8; float                                              ; +0x92, 0x18008fe72\nmovss   [rsp+88h+var_68], xmm9; float                                  ; +0x96, 0x18008fe76\nmovaps  xmm2, xmm7; float                                              ; +0x9d, 0x18008fe7d\nmovaps  xmm1, xmm0; float                                              ; +0xa0, 0x18008fe80\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0xa3, 0x18008fe83\ncmp     qword ptr [rdi+170h], 0                                        ; +0xa8, 0x18008fe88\njz      short loc_18008FEA4                                            ; +0xb0, 0x18008fe90\nmov     rcx, [rdi+160h]                                                ; +0xb2, 0x18008fe92\nmov     rax, [rcx]                                                     ; +0xb9, 0x18008fe99\ncall    qword ptr [rax+58h]                                            ; +0xbc, 0x18008fe9c\nmov     rbx, rax                                                       ; +0xbf, 0x18008fe9f\njmp     short loc_18008FEAB                                            ; +0xc2, 0x18008fea2\nmov     rbx, [rdi+1A0h]                                                ; +0xc4, 0x18008fea4\ntest    rbx, rbx                                                       ; +0xcb, 0x18008feab\njz      loc_18008FFFD                                                  ; +0xce, 0x18008feae\nmov     rax, [rbx]                                                     ; +0xd4, 0x18008feb4\nmov     rcx, rbx                                                       ; +0xd7, 0x18008feb7\ncall    qword ptr [rax+50h]                                            ; +0xda, 0x18008feba\nmov     eax, eax                                                       ; +0xdd, 0x18008febd\nxorps   xmm6, xmm6                                                     ; +0xdf, 0x18008febf\nmov     rcx, rbx                                                       ; +0xe2, 0x18008fec2\ncvtsi2ss xmm6, rax                                                     ; +0xe5, 0x18008fec5\nmov     rax, [rbx]                                                     ; +0xea, 0x18008feca\ncall    qword ptr [rax+58h]                                            ; +0xed, 0x18008fecd\ncmp     byte ptr [rdi+1B8h], 0                                         ; +0xf0, 0x18008fed0\nxorps   xmm5, xmm5                                                     ; +0xf7, 0x18008fed7\nmovss   xmm0, [rsp+88h+var_58]                                         ; +0xfa, 0x18008feda\nmov     eax, eax                                                       ; +0x100, 0x18008fee0\nmovaps  xmm3, xmm0                                                     ; +0x102, 0x18008fee2\ndivss   xmm3, xmm6                                                     ; +0x105, 0x18008fee5\ncvtsi2ss xmm5, rax                                                     ; +0x109, 0x18008fee9\nmovzx   eax, byte ptr [rdi+22Dh]                                       ; +0x10e, 0x18008feee\njz      short loc_18008FF4D                                            ; +0x115, 0x18008fef5\nmovss   xmm2, [rsp+88h+var_4C]                                         ; +0x117, 0x18008fef7\nmovss   xmm1, [rsp+88h+var_50]                                         ; +0x11d, 0x18008fefd\naddss   xmm2, xmm0                                                     ; +0x123, 0x18008ff03\nmovss   xmm0, [rsp+88h+var_54]                                         ; +0x127, 0x18008ff07\naddss   xmm1, xmm0                                                     ; +0x12d, 0x18008ff0d\nmovaps  xmm4, xmm0                                                     ; +0x131, 0x18008ff11\ndivss   xmm4, xmm5                                                     ; +0x134, 0x18008ff14\ndivss   xmm1, xmm5                                                     ; +0x138, 0x18008ff18\ndivss   xmm2, xmm6                                                     ; +0x13c, 0x18008ff1c\ntest    al, al                                                         ; +0x140, 0x18008ff20\njz      short loc_18008FF2D                                            ; +0x142, 0x18008ff22\nmovaps  xmm0, xmm4                                                     ; +0x144, 0x18008ff24\nmovaps  xmm4, xmm1                                                     ; +0x147, 0x18008ff27\nmovaps  xmm1, xmm0                                                     ; +0x14a, 0x18008ff2a\ncmp     byte ptr [rdi+22Eh], 0                                         ; +0x14d, 0x18008ff2d\njz      short loc_18008FF3F                                            ; +0x154, 0x18008ff34\nmovaps  xmm0, xmm3                                                     ; +0x156, 0x18008ff36\nmovaps  xmm3, xmm2                                                     ; +0x159, 0x18008ff39\nmovaps  xmm2, xmm0                                                     ; +0x15c, 0x18008ff3c\nmovaps  xmm0, xmm1                                                     ; +0x15f, 0x18008ff3f\nmovaps  xmm5, xmm2                                                     ; +0x162, 0x18008ff42\nmovaps  xmm6, xmm3                                                     ; +0x165, 0x18008ff45\nmovaps  xmm7, xmm4                                                     ; +0x168, 0x18008ff48\njmp     short loc_18008FF9D                                            ; +0x16b, 0x18008ff4b\nmovss   xmm1, [rsp+88h+var_54]                                         ; +0x16d, 0x18008ff4d\nmovss   xmm2, [rsp+88h+var_50]                                         ; +0x173, 0x18008ff53\nmovaps  xmm4, xmm1                                                     ; +0x179, 0x18008ff59\naddss   xmm2, xmm0                                                     ; +0x17c, 0x18008ff5c\naddss   xmm1, [rsp+88h+var_4C]                                         ; +0x180, 0x18008ff60\ndivss   xmm4, xmm5                                                     ; +0x186, 0x18008ff66\ndivss   xmm1, xmm5                                                     ; +0x18a, 0x18008ff6a\ndivss   xmm2, xmm6                                                     ; +0x18e, 0x18008ff6e\ntest    al, al                                                         ; +0x192, 0x18008ff72\njz      short loc_18008FF7F                                            ; +0x194, 0x18008ff74\nmovaps  xmm0, xmm3                                                     ; +0x196, 0x18008ff76\nmovaps  xmm3, xmm2                                                     ; +0x199, 0x18008ff79\nmovaps  xmm2, xmm0                                                     ; +0x19c, 0x18008ff7c\ncmp     byte ptr [rdi+22Eh], 0                                         ; +0x19f, 0x18008ff7f\njz      short loc_18008FF91                                            ; +0x1a6, 0x18008ff86\nmovaps  xmm0, xmm4                                                     ; +0x1a8, 0x18008ff88\nmovaps  xmm4, xmm1                                                     ; +0x1ab, 0x18008ff8b\nmovaps  xmm1, xmm0                                                     ; +0x1ae, 0x18008ff8e\nmovaps  xmm0, xmm4                                                     ; +0x1b1, 0x18008ff91\nmovaps  xmm5, xmm3                                                     ; +0x1b4, 0x18008ff94\nmovaps  xmm6, xmm2                                                     ; +0x1b7, 0x18008ff97\nmovaps  xmm7, xmm1                                                     ; +0x1ba, 0x18008ff9a\nmovss   dword ptr [rdi+1F4h], xmm3                                     ; +0x1bd, 0x18008ff9d\nmovss   dword ptr [rdi+1F8h], xmm7                                     ; +0x1c5, 0x18008ffa5\nmovss   dword ptr [rdi+224h], xmm6                                     ; +0x1cd, 0x18008ffad\nmovss   dword ptr [rdi+228h], xmm1                                     ; +0x1d5, 0x18008ffb5\nmovss   dword ptr [rdi+1DCh], xmm5                                     ; +0x1dd, 0x18008ffbd\nmovss   dword ptr [rdi+1E0h], xmm4                                     ; +0x1e5, 0x18008ffc5\nmovss   dword ptr [rdi+20Ch], xmm2                                     ; +0x1ed, 0x18008ffcd\nmovss   dword ptr [rdi+210h], xmm0                                     ; +0x1f5, 0x18008ffd5\nmovss   dword ptr [rdi+244h], xmm3                                     ; +0x1fd, 0x18008ffdd\nmovss   dword ptr [rdi+248h], xmm2                                     ; +0x205, 0x18008ffe5\nmovss   dword ptr [rdi+24Ch], xmm1                                     ; +0x20d, 0x18008ffed\nmovss   dword ptr [rdi+250h], xmm4                                     ; +0x215, 0x18008fff5\nmov     rbx, [rsp+88h+arg_0]                                           ; +0x21d, 0x18008fffd\nmovaps  xmm6, [rsp+88h+var_18]                                         ; +0x225, 0x180090005\nmovaps  xmm7, [rsp+88h+var_28]                                         ; +0x22a, 0x18009000a\nmovaps  xmm8, [rsp+88h+var_38]                                         ; +0x22f, 0x18009000f\nmovaps  xmm9, [rsp+88h+var_48]                                         ; +0x235, 0x180090015\nadd     rsp, 80h                                                       ; +0x23b, 0x18009001b\npop     rdi                                                            ; +0x242, 0x180090022\nretn                                                                   ; +0x243, 0x180090023", "xrefs": ["<???> @ 0x1800f1d90", "<???> @ 0x1800f2278", "<???> @ 0x1800f2e28", "<???> @ 0x18010a268", "<???> @ 0x18010d280", "<???> @ 0x18014cf68", "<???> @ 0x1801c00f0"], "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"}