{"type": "func", "start": 6443040848, "end": 6443041737, "name": "cocos2d::CCSprite::setTextureRect", "pseudocode": "// \n// cocos2d::CCSprite::setTextureRect from 0x180090050 to 0x1800903c9 (889 bytes)\n// \n// 9 xrefs:\n// > <???> @ 0x1800f1d48\n// > <???> @ 0x1800f2230\n// > <???> @ 0x1800f2de0\n// > <???> @ 0x18010a220\n// > <???> @ 0x18010d238\n// > <???> @ 0x180146898\n// > <???> @ 0x1801468b4\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c00fc\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::setTextureRect(\n        cocos2d::CCSprite *this,\n        const struct cocos2d::CCRect *a2,\n        char a3,\n        const struct cocos2d::CCSize *a4)\n{\n  __int64 v4; // rax\n  __int64 v7; // rdx\n  float v8; // xmm1_4\n  float v9; // xmm2_4\n  bool v10; // zf\n  float v11; // xmm4_4\n  float v12; // xmm3_4\n  float v13; // xmm5_4\n  float v14; // xmm1_4\n  float v15; // xmm3_4\n  float v16; // xmm0_4\n  float v17; // xmm3_4\n  float v18; // xmm5_4\n  float v19; // xmm7_4\n  float v20; // xmm9_4\n  float v21; // xmm8_4\n  float v22; // xmm0_4\n  float v23; // xmm1_4\n  float v24; // xmm2_4\n  float v25; // xmm1_4\n  float v26; // xmm4_4\n  float v27; // [rsp+70h] [rbp+8h] BYREF\n  float v28; // [rsp+74h] [rbp+Ch]\n\n  v4 = *(_QWORD *)this;\n  *((_BYTE *)this + 440) = a3;\n  (*(void (__fastcall **)(cocos2d::CCSprite *, const struct cocos2d::CCSize *))(v4 + 312))(this, a4);\n  (*(void (__fastcall **)(cocos2d::CCSprite *, const struct cocos2d::CCRect *))(*(_QWORD *)this + 1000LL))(this, a2);\n  (*(void (__fastcall **)(cocos2d::CCSprite *, const struct cocos2d::CCRect *))(*(_QWORD *)this + 1056LL))(this, a2);\n  cocos2d::cc_timeval::operator=(&v27, (_DWORD *)this + 113);\n  v8 = v27;\n  if ( *((_BYTE *)this + 557) )\n  {\n    v8 = -v27;\n    v27 = -v27;\n  }\n  v9 = v28;\n  if ( *((_BYTE *)this + 558) )\n  {\n    v9 = -v28;\n    v28 = -v28;\n  }\n  v10 = *((_QWORD *)this + 46) == 0;\n  v11 = *((float *)this + 108);\n  v12 = *((float *)this + 28);\n  v13 = (float)((float)(*((float *)this + 27) - v11) * 0.5) + v8;\n  v14 = *((float *)this + 109);\n  *((float *)this + 111) = v13;\n  v15 = (float)((float)(v12 - v14) * 0.5) + v9;\n  *((float *)this + 112) = v15;\n  if ( v10 )\n  {\n    v16 = *((float *)this + 143);\n    v17 = v15 + 0.0;\n    v18 = v13 + 0.0;\n    v19 = v17 + v14;\n    *((float *)this + 121) = v18;\n    v20 = v18 + v11;\n    v21 = (float)(v17 + v14) - v17;\n    if ( v16 == 0.0 )\n    {\n      *((float *)this + 122) = v17;\n      *((_DWORD *)this + 123) = 0;\n    }\n    else\n    {\n      *((float *)this + 122) = v19 - (float)((float)(1.0 - v16) * v21);\n      *((_DWORD *)this + 123) = 0;\n      *((float *)this + 126) = *((float *)this + 148)\n                             - (float)((float)(*((float *)this + 148) - *((float *)this + 147)) * (float)(1.0 - v16));\n    }\n    v22 = *((float *)this + 144);\n    *((float *)this + 133) = v20;\n    if ( v22 == 0.0 )\n    {\n      *((float *)this + 134) = v17;\n      *((_DWORD *)this + 135) = 0;\n    }\n    else\n    {\n      *((float *)this + 134) = v19 - (float)((float)(1.0 - v22) * v21);\n      *((_DWORD *)this + 135) = 0;\n      *((float *)this + 138) = *((float *)this + 148)\n                             - (float)((float)(*((float *)this + 148) - *((float *)this + 147)) * (float)(1.0 - v22));\n    }\n    v23 = *((float *)this + 141);\n    *((float *)this + 115) = v18;\n    if ( v23 == 0.0 )\n    {\n      *((float *)this + 116) = v19;\n      *((_DWORD *)this + 117) = 0;\n    }\n    else\n    {\n      v24 = 1.0 - v23;\n      *((float *)this + 116) = (float)((float)(1.0 - v23) * v21) + v17;\n      *((_DWORD *)this + 117) = 0;\n      if ( v23 >= 0.0 )\n      {\n        if ( *((_BYTE *)this + 440) )\n          *((float *)this + 119) = (float)((float)(*((float *)this + 146) - *((float *)this + 145)) * v24)\n                                 + *((float *)this + 145);\n        else\n          *((float *)this + 120) = (float)((float)(*((float *)this + 148) - *((float *)this + 147)) * v24)\n                                 + *((float *)this + 147);\n      }\n    }\n    v25 = *((float *)this + 142);\n    *((float *)this + 127) = v20;\n    if ( v25 == 0.0 )\n    {\n      *((float *)this + 128) = v19;\n      *((_DWORD *)this + 129) = 0;\n    }\n    else\n    {\n      *((float *)this + 128) = (float)((float)(1.0 - v25) * v21) + v17;\n      *((_DWORD *)this + 129) = 0;\n      if ( v25 >= 0.0 )\n      {\n        v26 = 1.0 - v25;\n        if ( *((_BYTE *)this + 440) )\n          *((float *)this + 131) = (float)((float)(*((float *)this + 146) - *((float *)this + 145)) * v26)\n                                 + *((float *)this + 145);\n        else\n          *((float *)this + 132) = (float)((float)(*((float *)this + 148) - *((float *)this + 147)) * v26)\n                                 + *((float *)this + 147);\n      }\n    }\n  }\n  else\n  {\n    LOBYTE(v7) = 1;\n    (*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(*(_QWORD *)this + 1048LL))(this, v7);\n  }\n}", "assembly": "; \n; cocos2d::CCSprite::setTextureRect from 0x180090050 to 0x1800903c9 (889 bytes)\n; \n; 9 xrefs:\n; > <???> @ 0x1800f1d48\n; > <???> @ 0x1800f2230\n; > <???> @ 0x1800f2de0\n; > <???> @ 0x18010a220\n; > <???> @ 0x18010d238\n; > <???> @ 0x180146898\n; > <???> @ 0x1801468b4\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c00fc\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; \npush    rdi                                                            ; +0x0, 0x180090050\nsub     rsp, 60h                                                       ; +0x2, 0x180090052\nmov     rax, [rcx]                                                     ; +0x6, 0x180090056\nmov     rdi, rcx                                                       ; +0x9, 0x180090059\nmov     [rsp+68h+arg_8], rbx                                           ; +0xc, 0x18009005c\nmov     rbx, rdx                                                       ; +0x11, 0x180090061\nmov     rdx, r9                                                        ; +0x14, 0x180090064\nmov     [rcx+1B8h], r8b                                                ; +0x17, 0x180090067\ncall    qword ptr [rax+138h]                                           ; +0x1e, 0x18009006e\nmov     rax, [rdi]                                                     ; +0x24, 0x180090074\nmov     rdx, rbx                                                       ; +0x27, 0x180090077\nmov     rcx, rdi                                                       ; +0x2a, 0x18009007a\ncall    qword ptr [rax+3E8h]                                           ; +0x2d, 0x18009007d\nmov     rax, [rdi]                                                     ; +0x33, 0x180090083\nmov     rdx, rbx                                                       ; +0x36, 0x180090086\nmov     rcx, rdi                                                       ; +0x39, 0x180090089\ncall    qword ptr [rax+420h]                                           ; +0x3c, 0x18009008c\nlea     rdx, [rdi+1C4h]                                                ; +0x42, 0x180090092\nlea     rcx, [rsp+68h+arg_0]                                           ; +0x49, 0x180090099\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x4e, 0x18009009e\ncmp     byte ptr [rdi+22Dh], 0                                         ; +0x53, 0x1800900a3\nmovss   xmm0, dword ptr cs:xmmword_1800EC220                           ; +0x5a, 0x1800900aa\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x62, 0x1800900b2\nmovss   xmm1, [rsp+68h+arg_0]                                          ; +0x67, 0x1800900b7\njz      short loc_1800900C8                                            ; +0x6d, 0x1800900bd\nxorps   xmm1, xmm0                                                     ; +0x6f, 0x1800900bf\nmovss   [rsp+68h+arg_0], xmm1                                          ; +0x72, 0x1800900c2\ncmp     byte ptr [rdi+22Eh], 0                                         ; +0x78, 0x1800900c8\nmovss   xmm2, [rsp+68h+arg_4]                                          ; +0x7f, 0x1800900cf\njz      short loc_1800900E0                                            ; +0x85, 0x1800900d5\nxorps   xmm2, xmm0                                                     ; +0x87, 0x1800900d7\nmovss   [rsp+68h+arg_4], xmm2                                          ; +0x8a, 0x1800900da\ncmp     qword ptr [rdi+170h], 0                                        ; +0x90, 0x1800900e0\nmovss   xmm4, dword ptr [rdi+1B0h]                                     ; +0x98, 0x1800900e8\nmovss   xmm5, dword ptr [rdi+6Ch]                                      ; +0xa0, 0x1800900f0\nmovss   xmm3, dword ptr [rdi+70h]                                      ; +0xa5, 0x1800900f5\nsubss   xmm5, xmm4                                                     ; +0xaa, 0x1800900fa\nmulss   xmm5, cs:dword_1800EC358                                       ; +0xae, 0x1800900fe\naddss   xmm5, xmm1                                                     ; +0xb6, 0x180090106\nmovss   xmm1, dword ptr [rdi+1B4h]                                     ; +0xba, 0x18009010a\nsubss   xmm3, xmm1                                                     ; +0xc2, 0x180090112\nmovss   dword ptr [rdi+1BCh], xmm5                                     ; +0xc6, 0x180090116\nmulss   xmm3, cs:dword_1800EC358                                       ; +0xce, 0x18009011e\naddss   xmm3, xmm2                                                     ; +0xd6, 0x180090126\nmovss   dword ptr [rdi+1C0h], xmm3                                     ; +0xda, 0x18009012a\njz      short loc_180090148                                            ; +0xe2, 0x180090132\nmov     rax, [rdi]                                                     ; +0xe4, 0x180090134\nmov     dl, 1                                                          ; +0xe7, 0x180090137\nmov     rcx, rdi                                                       ; +0xe9, 0x180090139\ncall    qword ptr [rax+418h]                                           ; +0xec, 0x18009013c\nadd     rsp, 60h                                                       ; +0xf2, 0x180090142\npop     rdi                                                            ; +0xf6, 0x180090146\nretn                                                                   ; +0xf7, 0x180090147\nmovss   xmm0, dword ptr [rdi+23Ch]                                     ; +0xf8, 0x180090148\nmovaps  [rsp+68h+var_18], xmm6                                         ; +0x100, 0x180090150\nxorps   xmm6, xmm6                                                     ; +0x105, 0x180090155\nucomiss xmm0, xmm6                                                     ; +0x108, 0x180090158\nmovaps  [rsp+68h+var_28], xmm7                                         ; +0x10b, 0x18009015b\naddss   xmm3, xmm6                                                     ; +0x110, 0x180090160\nmovaps  [rsp+68h+var_38], xmm8                                         ; +0x114, 0x180090164\naddss   xmm5, xmm6                                                     ; +0x11a, 0x18009016a\nmovaps  [rsp+68h+var_48], xmm9                                         ; +0x11e, 0x18009016e\nmovaps  xmm7, xmm3                                                     ; +0x124, 0x180090174\naddss   xmm7, xmm1                                                     ; +0x127, 0x180090177\nmovss   dword ptr [rdi+1E4h], xmm5                                     ; +0x12b, 0x18009017b\nmovaps  xmm9, xmm5                                                     ; +0x133, 0x180090183\naddss   xmm9, xmm4                                                     ; +0x137, 0x180090187\nmovss   xmm4, cs:flt_1800EC208                                         ; +0x13c, 0x18009018c\nmovaps  xmm8, xmm7                                                     ; +0x144, 0x180090194\nsubss   xmm8, xmm3                                                     ; +0x148, 0x180090198\njp      short loc_1800901B3                                            ; +0x14d, 0x18009019d\njnz     short loc_1800901B3                                            ; +0x14f, 0x18009019f\nxor     eax, eax                                                       ; +0x151, 0x1800901a1\nmovss   dword ptr [rdi+1E8h], xmm3                                     ; +0x153, 0x1800901a3\nmov     [rdi+1ECh], eax                                                ; +0x15b, 0x1800901ab\njmp     short loc_1800901FC                                            ; +0x161, 0x1800901b1\nmovaps  xmm2, xmm4                                                     ; +0x163, 0x1800901b3\nxor     eax, eax                                                       ; +0x166, 0x1800901b6\nsubss   xmm2, xmm0                                                     ; +0x168, 0x1800901b8\nmovaps  xmm0, xmm7                                                     ; +0x16c, 0x1800901bc\nmovaps  xmm1, xmm2                                                     ; +0x16f, 0x1800901bf\nmulss   xmm1, xmm8                                                     ; +0x172, 0x1800901c2\nsubss   xmm0, xmm1                                                     ; +0x177, 0x1800901c7\nmovss   dword ptr [rdi+1E8h], xmm0                                     ; +0x17b, 0x1800901cb\nmov     [rdi+1ECh], eax                                                ; +0x183, 0x1800901d3\nmovss   xmm1, dword ptr [rdi+250h]                                     ; +0x189, 0x1800901d9\nmovaps  xmm0, xmm1                                                     ; +0x191, 0x1800901e1\nsubss   xmm0, dword ptr [rdi+24Ch]                                     ; +0x194, 0x1800901e4\nmulss   xmm0, xmm2                                                     ; +0x19c, 0x1800901ec\nsubss   xmm1, xmm0                                                     ; +0x1a0, 0x1800901f0\nmovss   dword ptr [rdi+1F8h], xmm1                                     ; +0x1a4, 0x1800901f4\nmovss   xmm0, dword ptr [rdi+240h]                                     ; +0x1ac, 0x1800901fc\nucomiss xmm0, xmm6                                                     ; +0x1b4, 0x180090204\nmovss   dword ptr [rdi+214h], xmm9                                     ; +0x1b7, 0x180090207\njp      short loc_180090224                                            ; +0x1c0, 0x180090210\njnz     short loc_180090224                                            ; +0x1c2, 0x180090212\nmovss   dword ptr [rdi+218h], xmm3                                     ; +0x1c4, 0x180090214\nmov     [rdi+21Ch], eax                                                ; +0x1cc, 0x18009021c\njmp     short loc_18009026B                                            ; +0x1d2, 0x180090222\nmovaps  xmm2, xmm4                                                     ; +0x1d4, 0x180090224\nsubss   xmm2, xmm0                                                     ; +0x1d7, 0x180090227\nmovaps  xmm0, xmm7                                                     ; +0x1db, 0x18009022b\nmovaps  xmm1, xmm2                                                     ; +0x1de, 0x18009022e\nmulss   xmm1, xmm8                                                     ; +0x1e1, 0x180090231\nsubss   xmm0, xmm1                                                     ; +0x1e6, 0x180090236\nmovss   dword ptr [rdi+218h], xmm0                                     ; +0x1ea, 0x18009023a\nmov     [rdi+21Ch], eax                                                ; +0x1f2, 0x180090242\nmovss   xmm1, dword ptr [rdi+250h]                                     ; +0x1f8, 0x180090248\nmovaps  xmm0, xmm1                                                     ; +0x200, 0x180090250\nsubss   xmm0, dword ptr [rdi+24Ch]                                     ; +0x203, 0x180090253\nmulss   xmm0, xmm2                                                     ; +0x20b, 0x18009025b\nsubss   xmm1, xmm0                                                     ; +0x20f, 0x18009025f\nmovss   dword ptr [rdi+228h], xmm1                                     ; +0x213, 0x180090263\nmovss   xmm1, dword ptr [rdi+234h]                                     ; +0x21b, 0x18009026b\nucomiss xmm1, xmm6                                                     ; +0x223, 0x180090273\nmovss   dword ptr [rdi+1CCh], xmm5                                     ; +0x226, 0x180090276\njp      short loc_180090292                                            ; +0x22e, 0x18009027e\njnz     short loc_180090292                                            ; +0x230, 0x180090280\nmovss   dword ptr [rdi+1D0h], xmm7                                     ; +0x232, 0x180090282\nmov     [rdi+1D4h], eax                                                ; +0x23a, 0x18009028a\njmp     short loc_18009030B                                            ; +0x240, 0x180090290\ncomiss  xmm1, xmm6                                                     ; +0x242, 0x180090292\nmovaps  xmm2, xmm4                                                     ; +0x245, 0x180090295\nsubss   xmm2, xmm1                                                     ; +0x248, 0x180090298\nmovaps  xmm0, xmm2                                                     ; +0x24c, 0x18009029c\nmulss   xmm0, xmm8                                                     ; +0x24f, 0x18009029f\naddss   xmm0, xmm3                                                     ; +0x254, 0x1800902a4\nmovss   dword ptr [rdi+1D0h], xmm0                                     ; +0x258, 0x1800902a8\nmov     [rdi+1D4h], eax                                                ; +0x260, 0x1800902b0\njb      short loc_18009030B                                            ; +0x266, 0x1800902b6\ncmp     byte ptr [rdi+1B8h], 0                                         ; +0x268, 0x1800902b8\njnz     short loc_1800902E7                                            ; +0x26f, 0x1800902bf\nmovss   xmm0, dword ptr [rdi+24Ch]                                     ; +0x271, 0x1800902c1\nmovss   xmm1, dword ptr [rdi+250h]                                     ; +0x279, 0x1800902c9\nsubss   xmm1, xmm0                                                     ; +0x281, 0x1800902d1\nmulss   xmm1, xmm2                                                     ; +0x285, 0x1800902d5\naddss   xmm1, xmm0                                                     ; +0x289, 0x1800902d9\nmovss   dword ptr [rdi+1E0h], xmm1                                     ; +0x28d, 0x1800902dd\njmp     short loc_18009030B                                            ; +0x295, 0x1800902e5\nmovss   xmm0, dword ptr [rdi+244h]                                     ; +0x297, 0x1800902e7\nmovss   xmm1, dword ptr [rdi+248h]                                     ; +0x29f, 0x1800902ef\nsubss   xmm1, xmm0                                                     ; +0x2a7, 0x1800902f7\nmulss   xmm1, xmm2                                                     ; +0x2ab, 0x1800902fb\naddss   xmm1, xmm0                                                     ; +0x2af, 0x1800902ff\nmovss   dword ptr [rdi+1DCh], xmm1                                     ; +0x2b3, 0x180090303\nmovss   xmm1, dword ptr [rdi+238h]                                     ; +0x2bb, 0x18009030b\nucomiss xmm1, xmm6                                                     ; +0x2c3, 0x180090313\nmovss   dword ptr [rdi+1FCh], xmm9                                     ; +0x2c6, 0x180090316\nmovaps  xmm9, [rsp+68h+var_48]                                         ; +0x2cf, 0x18009031f\njp      short loc_180090339                                            ; +0x2d5, 0x180090325\njnz     short loc_180090339                                            ; +0x2d7, 0x180090327\nmovss   dword ptr [rdi+200h], xmm7                                     ; +0x2d9, 0x180090329\nmov     [rdi+204h], eax                                                ; +0x2e1, 0x180090331\njmp     short loc_1800903B3                                            ; +0x2e7, 0x180090337\ncomiss  xmm1, xmm6                                                     ; +0x2e9, 0x180090339\nmovaps  xmm0, xmm4                                                     ; +0x2ec, 0x18009033c\nsubss   xmm0, xmm1                                                     ; +0x2ef, 0x18009033f\nmulss   xmm0, xmm8                                                     ; +0x2f3, 0x180090343\naddss   xmm0, xmm3                                                     ; +0x2f8, 0x180090348\nmovss   dword ptr [rdi+200h], xmm0                                     ; +0x2fc, 0x18009034c\nmov     [rdi+204h], eax                                                ; +0x304, 0x180090354\njb      short loc_1800903B3                                            ; +0x30a, 0x18009035a\ncmp     byte ptr [rdi+1B8h], 0                                         ; +0x30c, 0x18009035c\nsubss   xmm4, xmm1                                                     ; +0x313, 0x180090363\njnz     short loc_18009038F                                            ; +0x317, 0x180090367\nmovss   xmm0, dword ptr [rdi+24Ch]                                     ; +0x319, 0x180090369\nmovss   xmm1, dword ptr [rdi+250h]                                     ; +0x321, 0x180090371\nsubss   xmm1, xmm0                                                     ; +0x329, 0x180090379\nmulss   xmm1, xmm4                                                     ; +0x32d, 0x18009037d\naddss   xmm1, xmm0                                                     ; +0x331, 0x180090381\nmovss   dword ptr [rdi+210h], xmm1                                     ; +0x335, 0x180090385\njmp     short loc_1800903B3                                            ; +0x33d, 0x18009038d\nmovss   xmm0, dword ptr [rdi+244h]                                     ; +0x33f, 0x18009038f\nmovss   xmm1, dword ptr [rdi+248h]                                     ; +0x347, 0x180090397\nsubss   xmm1, xmm0                                                     ; +0x34f, 0x18009039f\nmulss   xmm1, xmm4                                                     ; +0x353, 0x1800903a3\naddss   xmm1, xmm0                                                     ; +0x357, 0x1800903a7\nmovss   dword ptr [rdi+20Ch], xmm1                                     ; +0x35b, 0x1800903ab\nmovaps  xmm7, [rsp+68h+var_28]                                         ; +0x363, 0x1800903b3\nmovaps  xmm6, [rsp+68h+var_18]                                         ; +0x368, 0x1800903b8\nmovaps  xmm8, [rsp+68h+var_38]                                         ; +0x36d, 0x1800903bd\nadd     rsp, 60h                                                       ; +0x373, 0x1800903c3\npop     rdi                                                            ; +0x377, 0x1800903c7\nretn                                                                   ; +0x378, 0x1800903c8", "xrefs": ["<???> @ 0x1800f1d48", "<???> @ 0x1800f2230", "<???> @ 0x1800f2de0", "<???> @ 0x18010a220", "<???> @ 0x18010d238", "<???> @ 0x180146898", "<???> @ 0x1801468b4", "<???> @ 0x18014cf68", "<???> @ 0x1801c00fc"], "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"}