{"type": "func", "start": 6443039936, "end": 6443040350, "name": "cocos2d::CCSpriteFrame::initWithTexture", "pseudocode": "// \n// cocos2d::CCSpriteFrame::initWithTexture from 0x18008fcc0 to 0x18008fe5e (414 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCSpriteFrame::createWithTexture @ 0x18008fb39\n// > cocos2d::CCSpriteFrame::initWithTexture @ 0x18008fc98\n// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x1800911d4\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b6264\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::initWithTexture(\n        cocos2d::CCSpriteFrame *this,\n        struct cocos2d::CCTexture2D *a2,\n        const struct cocos2d::CCRect *a3,\n        bool a4,\n        struct cocos2d::CCPoint *a5,\n        struct cocos2d::CCSize *a6)\n{\n  cocos2d::CCDirector *v9; // rax\n  float v10; // xmm8_4\n  cocos2d::CCDirector *v11; // rax\n  float v12; // xmm7_4\n  cocos2d::CCDirector *v13; // rax\n  float v14; // xmm6_4\n  cocos2d::CCDirector *v15; // rax\n  float ContentScaleFactor; // xmm0_4\n  cocos2d::CCRect *v17; // rax\n  cocos2d::CCDirector *v18; // rax\n  float v19; // xmm6_4\n  cocos2d::CCDirector *v20; // rax\n  float v21; // xmm0_4\n  float *v22; // rax\n  cocos2d::CCDirector *v23; // rax\n  float v24; // xmm6_4\n  cocos2d::CCDirector *v25; // rax\n  float v26; // xmm0_4\n  float *v27; // rax\n  cocos2d::CCRect v29; // [rsp+30h] [rbp-48h] BYREF\n  float v30; // [rsp+80h] [rbp+8h] BYREF\n\n  this->m_pobTexture = a2;\n  if ( a2 )\n    cocos2d::CCObject::retain(a2);\n  cocos2d::CCRect::operator=((float *)&this->m_obRectInPixels.origin, (float *)&a3->origin);\n  v9 = cocos2d::CCDirector::sharedDirector();\n  v10 = a3->size.height / cocos2d::CCDirector::getContentScaleFactor(v9);\n  v11 = cocos2d::CCDirector::sharedDirector();\n  v12 = a3->size.width / cocos2d::CCDirector::getContentScaleFactor(v11);\n  v13 = cocos2d::CCDirector::sharedDirector();\n  v14 = a3->origin.y / cocos2d::CCDirector::getContentScaleFactor(v13);\n  v15 = cocos2d::CCDirector::sharedDirector();\n  ContentScaleFactor = cocos2d::CCDirector::getContentScaleFactor(v15);\n  v17 = cocos2d::CCRect::CCRect(&v29, a3->origin.x / ContentScaleFactor, v14, v12, v10);\n  cocos2d::CCRect::operator=((float *)&this->m_obRect.origin, (float *)&v17->origin);\n  cocos2d::CCSize::operator=(&this->m_obOffsetInPixels, a5);\n  v18 = cocos2d::CCDirector::sharedDirector();\n  v19 = this->m_obOffsetInPixels.y / cocos2d::CCDirector::getContentScaleFactor(v18);\n  v20 = cocos2d::CCDirector::sharedDirector();\n  v21 = cocos2d::CCDirector::getContentScaleFactor(v20);\n  v22 = kmVec2Fill(&v30, this->m_obOffsetInPixels.x / v21, v19);\n  cocos2d::CCSize::operator=(&this->m_obOffset, v22);\n  cocos2d::CCSize::operator=(&this->m_obOriginalSizeInPixels, a6);\n  v23 = cocos2d::CCDirector::sharedDirector();\n  v24 = this->m_obOriginalSizeInPixels.height / cocos2d::CCDirector::getContentScaleFactor(v23);\n  v25 = cocos2d::CCDirector::sharedDirector();\n  v26 = cocos2d::CCDirector::getContentScaleFactor(v25);\n  v27 = kmVec2Fill(&v30, this->m_obOriginalSizeInPixels.width / v26, v24);\n  cocos2d::CCSize::operator=(&this->m_obOriginalSize, v27);\n  this->m_bRotated = a4;\n  return 1;\n}", "assembly": "; \n; cocos2d::CCSpriteFrame::initWithTexture from 0x18008fcc0 to 0x18008fe5e (414 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCSpriteFrame::createWithTexture @ 0x18008fb39\n; > cocos2d::CCSpriteFrame::initWithTexture @ 0x18008fc98\n; > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x1800911d4\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b6264\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, 0x18008fcc0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x18008fcc5\npush    rdi                                                            ; +0xa, 0x18008fcca\nsub     rsp, 70h                                                       ; +0xb, 0x18008fccb\nmovaps  [rsp+78h+var_18], xmm6                                         ; +0xf, 0x18008fccf\nmovzx   esi, r9b                                                       ; +0x14, 0x18008fcd4\nmovaps  [rsp+78h+var_28], xmm7                                         ; +0x18, 0x18008fcd8\nmov     rbx, r8                                                        ; +0x1d, 0x18008fcdd\nmovaps  [rsp+78h+var_38], xmm8                                         ; +0x20, 0x18008fce0\nmov     rdi, rcx                                                       ; +0x26, 0x18008fce6\nmov     [rcx+80h], rdx                                                 ; +0x29, 0x18008fce9\ntest    rdx, rdx                                                       ; +0x30, 0x18008fcf0\njz      short loc_18008FCFD                                            ; +0x33, 0x18008fcf3\nmov     rcx, rdx; this                                                 ; +0x35, 0x18008fcf5\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x38, 0x18008fcf8\nlea     rcx, [rdi+48h]                                                 ; +0x3d, 0x18008fcfd\nmov     rdx, rbx                                                       ; +0x41, 0x18008fd01\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0x44, 0x18008fd04\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x49, 0x18008fd09\nmov     rcx, rax; this                                                 ; +0x4e, 0x18008fd0e\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x51, 0x18008fd11\nmovss   xmm8, dword ptr [rbx+0Ch]                                      ; +0x56, 0x18008fd16\ndivss   xmm8, xmm0                                                     ; +0x5c, 0x18008fd1c\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x61, 0x18008fd21\nmov     rcx, rax; this                                                 ; +0x66, 0x18008fd26\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x69, 0x18008fd29\nmovss   xmm7, dword ptr [rbx+8]                                        ; +0x6e, 0x18008fd2e\ndivss   xmm7, xmm0                                                     ; +0x73, 0x18008fd33\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x77, 0x18008fd37\nmov     rcx, rax; this                                                 ; +0x7c, 0x18008fd3c\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x7f, 0x18008fd3f\nmovss   xmm6, dword ptr [rbx+4]                                        ; +0x84, 0x18008fd44\ndivss   xmm6, xmm0                                                     ; +0x89, 0x18008fd49\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x8d, 0x18008fd4d\nmov     rcx, rax; this                                                 ; +0x92, 0x18008fd52\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x95, 0x18008fd55\nlea     rcx, [rsp+78h+var_48]; this                                    ; +0x9a, 0x18008fd5a\nmovss   xmm1, dword ptr [rbx]                                          ; +0x9f, 0x18008fd5f\nmovaps  xmm3, xmm7; float                                              ; +0xa3, 0x18008fd63\ndivss   xmm1, xmm0; float                                              ; +0xa6, 0x18008fd66\nmovaps  xmm2, xmm6; float                                              ; +0xaa, 0x18008fd6a\nmovss   [rsp+78h+var_58], xmm8; float                                  ; +0xad, 0x18008fd6d\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0xb4, 0x18008fd74\nmov     rdx, rax                                                       ; +0xb9, 0x18008fd79\nlea     rcx, [rdi+5Ch]                                                 ; +0xbc, 0x18008fd7c\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0xc0, 0x18008fd80\nmov     rdx, [rsp+78h+arg_20]                                          ; +0xc5, 0x18008fd85\nlea     rcx, [rdi+6Ch]                                                 ; +0xcd, 0x18008fd8d\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xd1, 0x18008fd91\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xd6, 0x18008fd96\nmov     rcx, rax; this                                                 ; +0xdb, 0x18008fd9b\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0xde, 0x18008fd9e\nmovss   xmm6, dword ptr [rdi+70h]                                      ; +0xe3, 0x18008fda3\ndivss   xmm6, xmm0                                                     ; +0xe8, 0x18008fda8\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xec, 0x18008fdac\nmov     rcx, rax; this                                                 ; +0xf1, 0x18008fdb1\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0xf4, 0x18008fdb4\nlea     rcx, [rsp+78h+arg_0]                                           ; +0xf9, 0x18008fdb9\nmovss   xmm1, dword ptr [rdi+6Ch]                                      ; +0x101, 0x18008fdc1\nmovaps  xmm2, xmm6                                                     ; +0x106, 0x18008fdc6\ndivss   xmm1, xmm0                                                     ; +0x109, 0x18008fdc9\ncall    kmVec2Fill                                                     ; +0x10d, 0x18008fdcd\nmov     rdx, rax                                                       ; +0x112, 0x18008fdd2\nlea     rcx, [rdi+38h]                                                 ; +0x115, 0x18008fdd5\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x119, 0x18008fdd9\nmov     rdx, [rsp+78h+arg_28]                                          ; +0x11e, 0x18008fdde\nlea     rcx, [rdi+74h]                                                 ; +0x126, 0x18008fde6\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x12a, 0x18008fdea\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x12f, 0x18008fdef\nmov     rcx, rax; this                                                 ; +0x134, 0x18008fdf4\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x137, 0x18008fdf7\nmovss   xmm6, dword ptr [rdi+78h]                                      ; +0x13c, 0x18008fdfc\ndivss   xmm6, xmm0                                                     ; +0x141, 0x18008fe01\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x145, 0x18008fe05\nmov     rcx, rax; this                                                 ; +0x14a, 0x18008fe0a\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x14d, 0x18008fe0d\nlea     rcx, [rsp+78h+arg_0]                                           ; +0x152, 0x18008fe12\nmovss   xmm1, dword ptr [rdi+74h]                                      ; +0x15a, 0x18008fe1a\nmovaps  xmm2, xmm6                                                     ; +0x15f, 0x18008fe1f\ndivss   xmm1, xmm0                                                     ; +0x162, 0x18008fe22\ncall    kmVec2Fill                                                     ; +0x166, 0x18008fe26\nmov     rdx, rax                                                       ; +0x16b, 0x18008fe2b\nlea     rcx, [rdi+40h]                                                 ; +0x16e, 0x18008fe2e\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x172, 0x18008fe32\nmovaps  xmm6, [rsp+78h+var_18]                                         ; +0x177, 0x18008fe37\nlea     r11, [rsp+78h+var_8]                                           ; +0x17c, 0x18008fe3c\nmov     rbx, [r11+18h]                                                 ; +0x181, 0x18008fe41\nmov     al, 1                                                          ; +0x185, 0x18008fe45\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x187, 0x18008fe47\nmovaps  xmm7, [rsp+78h+var_28]                                         ; +0x18c, 0x18008fe4c\nmov     [rdi+58h], sil                                                 ; +0x191, 0x18008fe51\nmov     rsi, [r11+20h]                                                 ; +0x195, 0x18008fe55\nmov     rsp, r11                                                       ; +0x199, 0x18008fe59\npop     rdi                                                            ; +0x19c, 0x18008fe5c\nretn                                                                   ; +0x19d, 0x18008fe5d", "xrefs": ["cocos2d::CCSpriteFrame::createWithTexture @ 0x18008fb39", "cocos2d::CCSpriteFrame::initWithTexture @ 0x18008fc98", "cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x1800911d4", "<???> @ 0x1801438a8", "<???> @ 0x1801b6264"], "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"}