{"type": "func", "start": 6443040576, "end": 6443041015, "name": "cocos2d::CCSpriteFrame::initWithTextureFilename", "pseudocode": "// \n// cocos2d::CCSpriteFrame::initWithTextureFilename from 0x18008ff40 to 0x1800900f7 (439 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCSpriteFrame::copyWithZone @ 0x18008f8c2\n// > cocos2d::CCSpriteFrame::create @ 0x18008fa09\n// > cocos2d::CCSpriteFrame::initWithTextureFilename @ 0x18008ff18\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b627c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nchar __fastcall cocos2d::CCSpriteFrame::initWithTextureFilename(\n        cocos2d::CCSpriteFrame *this,\n        char *a2,\n        const struct cocos2d::CCRect *a3,\n        bool a4,\n        struct cocos2d::CCPoint *a5,\n        struct cocos2d::CCSize *a6)\n{\n  size_t v9; // r8\n  cocos2d::CCDirector *v10; // rax\n  float v11; // xmm8_4\n  cocos2d::CCDirector *v12; // rax\n  float v13; // xmm7_4\n  cocos2d::CCDirector *v14; // rax\n  float v15; // xmm6_4\n  cocos2d::CCDirector *v16; // rax\n  float ContentScaleFactor; // xmm0_4\n  cocos2d::CCRect *v18; // rax\n  cocos2d::CCDirector *v19; // rax\n  float v20; // xmm6_4\n  cocos2d::CCDirector *v21; // rax\n  float v22; // xmm0_4\n  float *v23; // rax\n  cocos2d::CCDirector *v24; // rax\n  float v25; // xmm6_4\n  cocos2d::CCDirector *v26; // rax\n  float v27; // xmm0_4\n  float *v28; // rax\n  cocos2d::CCRect v30; // [rsp+30h] [rbp-48h] BYREF\n  float v31; // [rsp+80h] [rbp+8h] BYREF\n\n  this->m_pobTexture = nullptr;\n  v9 = -1;\n  do\n    ++v9;\n  while ( a2[v9] );\n  sub_180010050((void **)&this->m_strTextureFilename, a2, v9);\n  cocos2d::CCRect::operator=((float *)&this->m_obRectInPixels.origin, (float *)&a3->origin);\n  v10 = cocos2d::CCDirector::sharedDirector();\n  v11 = a3->size.height / cocos2d::CCDirector::getContentScaleFactor(v10);\n  v12 = cocos2d::CCDirector::sharedDirector();\n  v13 = a3->size.width / cocos2d::CCDirector::getContentScaleFactor(v12);\n  v14 = cocos2d::CCDirector::sharedDirector();\n  v15 = a3->origin.y / cocos2d::CCDirector::getContentScaleFactor(v14);\n  v16 = cocos2d::CCDirector::sharedDirector();\n  ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v16);\n  v18 = cocos2d::CCRect::CCRect(&v30, a3->origin.x / ContentScaleFactor, v15, v13, v11);\n  cocos2d::CCRect::operator=((float *)&this->m_obRect.origin, (float *)&v18->origin);\n  cocos2d::CCSize::operator=(&this->m_obOffsetInPixels, a5);\n  v19 = cocos2d::CCDirector::sharedDirector();\n  v20 = this->m_obOffsetInPixels.y / cocos2d::CCDirector::getContentScaleFactor(v19);\n  v21 = cocos2d::CCDirector::sharedDirector();\n  v22 = cocos2d::CCDirector::getContentScaleFactor(v21);\n  v23 = kmVec2Fill(&v31, this->m_obOffsetInPixels.x / v22, v20);\n  cocos2d::CCSize::operator=(&this->m_obOffset, v23);\n  cocos2d::CCSize::operator=(&this->m_obOriginalSizeInPixels, a6);\n  v24 = cocos2d::CCDirector::sharedDirector();\n  v25 = this->m_obOriginalSizeInPixels.height / cocos2d::CCDirector::getContentScaleFactor(v24);\n  v26 = cocos2d::CCDirector::sharedDirector();\n  v27 = cocos2d::CCDirector::getContentScaleFactor(v26);\n  v28 = kmVec2Fill(&v31, this->m_obOriginalSizeInPixels.width / v27, v25);\n  cocos2d::CCSize::operator=(&this->m_obOriginalSize, v28);\n  this->m_bRotated = a4;\n  return 1;\n}", "assembly": "; \n; cocos2d::CCSpriteFrame::initWithTextureFilename from 0x18008ff40 to 0x1800900f7 (439 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCSpriteFrame::copyWithZone @ 0x18008f8c2\n; > cocos2d::CCSpriteFrame::create @ 0x18008fa09\n; > cocos2d::CCSpriteFrame::initWithTextureFilename @ 0x18008ff18\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b627c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18008ff40\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18008ff45\npush    rdi                                                            ; +0xa, 0x18008ff4a\nsub     rsp, 70h                                                       ; +0xb, 0x18008ff4b\nmovaps  [rsp+78h+var_18], xmm6                                         ; +0xf, 0x18008ff4f\nmov     rbx, r8                                                        ; +0x14, 0x18008ff54\nmovaps  [rsp+78h+var_28], xmm7                                         ; +0x17, 0x18008ff57\nmovzx   esi, r9b                                                       ; +0x1c, 0x18008ff5c\nmovaps  [rsp+78h+var_38], xmm8                                         ; +0x20, 0x18008ff60\nmov     rdi, rcx                                                       ; +0x26, 0x18008ff66\nmov     qword ptr [rcx+80h], 0                                         ; +0x29, 0x18008ff69\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x34, 0x18008ff74\nnop     dword ptr [rax+rax+00h]                                        ; +0x3b, 0x18008ff7b\ninc     r8; Size                                                       ; +0x40, 0x18008ff80\ncmp     byte ptr [rdx+r8], 0                                           ; +0x43, 0x18008ff83\njnz     short loc_18008FF80                                            ; +0x48, 0x18008ff88\nadd     rcx, 88h; void *                                               ; +0x4a, 0x18008ff8a\ncall    sub_180010050                                                  ; +0x51, 0x18008ff91\nlea     rcx, [rdi+48h]                                                 ; +0x56, 0x18008ff96\nmov     rdx, rbx                                                       ; +0x5a, 0x18008ff9a\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0x5d, 0x18008ff9d\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x62, 0x18008ffa2\nmov     rcx, rax; this                                                 ; +0x67, 0x18008ffa7\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x6a, 0x18008ffaa\nmovss   xmm8, dword ptr [rbx+0Ch]                                      ; +0x6f, 0x18008ffaf\ndivss   xmm8, xmm0                                                     ; +0x75, 0x18008ffb5\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x7a, 0x18008ffba\nmov     rcx, rax; this                                                 ; +0x7f, 0x18008ffbf\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x82, 0x18008ffc2\nmovss   xmm7, dword ptr [rbx+8]                                        ; +0x87, 0x18008ffc7\ndivss   xmm7, xmm0                                                     ; +0x8c, 0x18008ffcc\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x90, 0x18008ffd0\nmov     rcx, rax; this                                                 ; +0x95, 0x18008ffd5\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x98, 0x18008ffd8\nmovss   xmm6, dword ptr [rbx+4]                                        ; +0x9d, 0x18008ffdd\ndivss   xmm6, xmm0                                                     ; +0xa2, 0x18008ffe2\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xa6, 0x18008ffe6\nmov     rcx, rax; this                                                 ; +0xab, 0x18008ffeb\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0xae, 0x18008ffee\nlea     rcx, [rsp+78h+var_48]; this                                    ; +0xb3, 0x18008fff3\nmovss   xmm1, dword ptr [rbx]                                          ; +0xb8, 0x18008fff8\nmovaps  xmm3, xmm7; float                                              ; +0xbc, 0x18008fffc\ndivss   xmm1, xmm0; float                                              ; +0xbf, 0x18008ffff\nmovaps  xmm2, xmm6; float                                              ; +0xc3, 0x180090003\nmovss   [rsp+78h+var_58], xmm8; float                                  ; +0xc6, 0x180090006\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0xcd, 0x18009000d\nmov     rdx, rax                                                       ; +0xd2, 0x180090012\nlea     rcx, [rdi+5Ch]                                                 ; +0xd5, 0x180090015\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0xd9, 0x180090019\nmov     rdx, [rsp+78h+arg_20]                                          ; +0xde, 0x18009001e\nlea     rcx, [rdi+6Ch]                                                 ; +0xe6, 0x180090026\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xea, 0x18009002a\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xef, 0x18009002f\nmov     rcx, rax; this                                                 ; +0xf4, 0x180090034\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0xf7, 0x180090037\nmovss   xmm6, dword ptr [rdi+70h]                                      ; +0xfc, 0x18009003c\ndivss   xmm6, xmm0                                                     ; +0x101, 0x180090041\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x105, 0x180090045\nmov     rcx, rax; this                                                 ; +0x10a, 0x18009004a\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x10d, 0x18009004d\nlea     rcx, [rsp+78h+arg_0]                                           ; +0x112, 0x180090052\nmovss   xmm1, dword ptr [rdi+6Ch]                                      ; +0x11a, 0x18009005a\nmovaps  xmm2, xmm6                                                     ; +0x11f, 0x18009005f\ndivss   xmm1, xmm0                                                     ; +0x122, 0x180090062\ncall    kmVec2Fill                                                     ; +0x126, 0x180090066\nmov     rdx, rax                                                       ; +0x12b, 0x18009006b\nlea     rcx, [rdi+38h]                                                 ; +0x12e, 0x18009006e\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x132, 0x180090072\nmov     rdx, [rsp+78h+arg_28]                                          ; +0x137, 0x180090077\nlea     rcx, [rdi+74h]                                                 ; +0x13f, 0x18009007f\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x143, 0x180090083\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x148, 0x180090088\nmov     rcx, rax; this                                                 ; +0x14d, 0x18009008d\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x150, 0x180090090\nmovss   xmm6, dword ptr [rdi+78h]                                      ; +0x155, 0x180090095\ndivss   xmm6, xmm0                                                     ; +0x15a, 0x18009009a\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x15e, 0x18009009e\nmov     rcx, rax; this                                                 ; +0x163, 0x1800900a3\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x166, 0x1800900a6\nlea     rcx, [rsp+78h+arg_0]                                           ; +0x16b, 0x1800900ab\nmovss   xmm1, dword ptr [rdi+74h]                                      ; +0x173, 0x1800900b3\nmovaps  xmm2, xmm6                                                     ; +0x178, 0x1800900b8\ndivss   xmm1, xmm0                                                     ; +0x17b, 0x1800900bb\ncall    kmVec2Fill                                                     ; +0x17f, 0x1800900bf\nmov     rdx, rax                                                       ; +0x184, 0x1800900c4\nlea     rcx, [rdi+40h]                                                 ; +0x187, 0x1800900c7\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x18b, 0x1800900cb\nmovaps  xmm6, [rsp+78h+var_18]                                         ; +0x190, 0x1800900d0\nlea     r11, [rsp+78h+var_8]                                           ; +0x195, 0x1800900d5\nmov     rbx, [r11+18h]                                                 ; +0x19a, 0x1800900da\nmov     al, 1                                                          ; +0x19e, 0x1800900de\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x1a0, 0x1800900e0\nmovaps  xmm7, [rsp+78h+var_28]                                         ; +0x1a5, 0x1800900e5\nmov     [rdi+58h], sil                                                 ; +0x1aa, 0x1800900ea\nmov     rsi, [r11+20h]                                                 ; +0x1ae, 0x1800900ee\nmov     rsp, r11                                                       ; +0x1b2, 0x1800900f2\npop     rdi                                                            ; +0x1b5, 0x1800900f5\nretn                                                                   ; +0x1b6, 0x1800900f6", "xrefs": ["cocos2d::CCSpriteFrame::copyWithZone @ 0x18008f8c2", "cocos2d::CCSpriteFrame::create @ 0x18008fa09", "cocos2d::CCSpriteFrame::initWithTextureFilename @ 0x18008ff18", "<???> @ 0x1801438a8", "<???> @ 0x1801b627c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}