{"type": "func", "start": 6442772624, "end": 6442772992, "name": "cocos2d::CCLabelTTF::updateTexture", "pseudocode": "// \n// cocos2d::CCLabelTTF::updateTexture from 0x18004e890 to 0x18004ea00 (368 bytes)\n// \n// 9 xrefs:\n// > cocos2d::CCLabelTTF::_updateWithTextDefinition @ 0x18004dcc7\n// > cocos2d::CCLabelTTF::setDimensions @ 0x18004e6a2\n// > cocos2d::CCLabelTTF::setFontName @ 0x18004e770\n// > cocos2d::CCLabelTTF::setFontSize @ 0x18004e7bf\n// > cocos2d::CCLabelTTF::setHorizontalAlignment @ 0x18004e7e6\n// > cocos2d::CCLabelTTF::setString @ 0x18004e83d\n// > cocos2d::CCLabelTTF::setVerticalAlignment @ 0x18004e886\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b1cec\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\n// Hidden C++ exception states: #wind=1\nchar __fastcall cocos2d::CCLabelTTF::updateTexture(cocos2d::CCLabelTTF *this)\n{\n  cocos2d::CCTexture2D *v2; // rax\n  cocos2d::CCTexture2D *v3; // rbp\n  std::string *m_pFontName; // rdi\n  std::string *p_m_string; // rsi\n  cocos2d::CCDirector *v7; // rax\n  float v8; // xmm6_4\n  cocos2d::CCDirector *v9; // rax\n  float v10; // xmm0_4\n  const struct cocos2d::CCSize *v11; // rbx\n  cocos2d::CCDirector *v12; // rax\n  float v13; // xmm0_4\n  _DWORD *v14; // rax\n  cocos2d::CCRect v15; // [rsp+40h] [rbp-38h] BYREF\n  cocos2d::CCTexture2D *v16; // [rsp+88h] [rbp+10h] BYREF\n\n  v2 = (cocos2d::CCTexture2D *)operator new(0x68u);\n  v16 = v2;\n  if ( v2 )\n    v3 = (cocos2d::CCTexture2D *)cocos2d::CCTexture2D::CCTexture2D(v2);\n  else\n    v3 = nullptr;\n  if ( !v3 )\n    return 0;\n  m_pFontName = this->m_pFontName;\n  if ( m_pFontName->m_data.m_capacity > 0xF )\n    m_pFontName = (std::string *)m_pFontName->m_data.m_bigStorage;\n  p_m_string = &this->m_string;\n  if ( this->m_string.m_data.m_capacity > 0xF )\n    p_m_string = (std::string *)p_m_string->m_data.m_bigStorage;\n  v7 = cocos2d::CCDirector::sharedDirector();\n  v8 = cocos2d::CCDirector::getContentScaleFactor(v7) * this->m_tDimensions.height;\n  v9 = cocos2d::CCDirector::sharedDirector();\n  v10 = cocos2d::CCDirector::getContentScaleFactor(v9) * this->m_tDimensions.width;\n  v11 = (const struct cocos2d::CCSize *)kmVec2Fill((float *)&v16, v10, v8);\n  v12 = cocos2d::CCDirector::sharedDirector();\n  v13 = cocos2d::CCDirector::getContentScaleFactor(v12) * this->m_fFontSize;\n  cocos2d::CCTexture2D::initWithString(\n    v3,\n    p_m_string->m_data.m_smallStorage._Elems,\n    m_pFontName->m_data.m_smallStorage._Elems,\n    v13,\n    v11,\n    this->m_hAlignment,\n    this->m_vAlignment);\n  ((void (__fastcall *)(cocos2d::CCTextureProtocol *, cocos2d::CCTexture2D *))this->setTexture)(\n    &this->cocos2d::CCTextureProtocol,\n    v3);\n  cocos2d::CCObject::release(v3);\n  cocos2d::CCRect::CCRect(&v15, &unk_1801A83C8);\n  v14 = (_DWORD *)((__int64 (__fastcall *)(cocos2d::CCTexture2D *, cocos2d::CCTexture2D **))this->m_pobTexture->getContentSize)(\n                    this->m_pobTexture,\n                    &v16);\n  cocos2d::CCSize::operator=(&v15.size, v14);\n  ((void (__fastcall *)(cocos2d::CCLabelTTF *, cocos2d::CCRect *))this->setTextureRect_0)(this, &v15);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCLabelTTF::updateTexture from 0x18004e890 to 0x18004ea00 (368 bytes)\n; \n; 9 xrefs:\n; > cocos2d::CCLabelTTF::_updateWithTextDefinition @ 0x18004dcc7\n; > cocos2d::CCLabelTTF::setDimensions @ 0x18004e6a2\n; > cocos2d::CCLabelTTF::setFontName @ 0x18004e770\n; > cocos2d::CCLabelTTF::setFontSize @ 0x18004e7bf\n; > cocos2d::CCLabelTTF::setHorizontalAlignment @ 0x18004e7e6\n; > cocos2d::CCLabelTTF::setString @ 0x18004e83d\n; > cocos2d::CCLabelTTF::setVerticalAlignment @ 0x18004e886\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b1cec\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_0], rbx                                               ; +0x0, 0x18004e890\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18004e895\npush    rsi                                                            ; +0xa, 0x18004e89a\npush    rdi                                                            ; +0xb, 0x18004e89b\npush    r14                                                            ; +0xc, 0x18004e89c\nsub     rsp, 60h                                                       ; +0xe, 0x18004e89e\nmovaps  [rsp+78h+var_28], xmm6                                         ; +0x12, 0x18004e8a2\nmov     r14, rcx                                                       ; +0x17, 0x18004e8a7\nmov     ecx, 68h ; 'h'; Size                                           ; +0x1a, 0x18004e8aa\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1f, 0x18004e8af\nmov     [rsp+78h+arg_8], rax                                           ; +0x24, 0x18004e8b4\ntest    rax, rax                                                       ; +0x2c, 0x18004e8bc\njz      short loc_18004E8CE                                            ; +0x2f, 0x18004e8bf\nmov     rcx, rax; this                                                 ; +0x31, 0x18004e8c1\ncall    ??0CCTexture2D@cocos2d@@QEAA@XZ; cocos2d::CCTexture2D::CCTexture2D(void) ; +0x34, 0x18004e8c4\nmov     rbp, rax                                                       ; +0x39, 0x18004e8c9\njmp     short loc_18004E8D0                                            ; +0x3c, 0x18004e8cc\nxor     ebp, ebp                                                       ; +0x3e, 0x18004e8ce\ntest    rbp, rbp                                                       ; +0x40, 0x18004e8d0\njnz     short loc_18004E8DC                                            ; +0x43, 0x18004e8d3\nxor     al, al                                                         ; +0x45, 0x18004e8d5\njmp     loc_18004E9E6                                                  ; +0x47, 0x18004e8d7\nmov     rdi, [r14+270h]                                                ; +0x4c, 0x18004e8dc\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x53, 0x18004e8e3\njbe     short loc_18004E8ED                                            ; +0x58, 0x18004e8e8\nmov     rdi, [rdi]                                                     ; +0x5a, 0x18004e8ea\nlea     rsi, [r14+280h]                                                ; +0x5d, 0x18004e8ed\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x64, 0x18004e8f4\njbe     short loc_18004E8FE                                            ; +0x69, 0x18004e8f9\nmov     rsi, [rsi]                                                     ; +0x6b, 0x18004e8fb\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x6e, 0x18004e8fe\nmov     rcx, rax; this                                                 ; +0x73, 0x18004e903\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x76, 0x18004e906\nmovaps  xmm6, xmm0                                                     ; +0x7b, 0x18004e90b\nmulss   xmm6, dword ptr [r14+264h]                                     ; +0x7e, 0x18004e90e\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x87, 0x18004e917\nmov     rcx, rax; this                                                 ; +0x8c, 0x18004e91c\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0x8f, 0x18004e91f\nmulss   xmm0, dword ptr [r14+260h]                                     ; +0x94, 0x18004e924\nmovaps  xmm2, xmm6                                                     ; +0x9d, 0x18004e92d\nmovaps  xmm1, xmm0                                                     ; +0xa0, 0x18004e930\nlea     rcx, [rsp+78h+arg_8]                                           ; +0xa3, 0x18004e933\ncall    kmVec2Fill                                                     ; +0xab, 0x18004e93b\nmov     rbx, rax                                                       ; +0xb0, 0x18004e940\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xb3, 0x18004e943\nmov     rcx, rax; this                                                 ; +0xb8, 0x18004e948\ncall    ?getContentScaleFactor@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getContentScaleFactor(void) ; +0xbb, 0x18004e94b\nmulss   xmm0, dword ptr [r14+278h]                                     ; +0xc0, 0x18004e950\nmov     ecx, [r14+26Ch]                                                ; +0xc9, 0x18004e959\nmov     [rsp+78h+var_48], ecx                                          ; +0xd0, 0x18004e960\nmov     ecx, [r14+268h]                                                ; +0xd4, 0x18004e964\nmov     [rsp+78h+var_50], ecx                                          ; +0xdb, 0x18004e96b\nmov     [rsp+78h+var_58], rbx                                          ; +0xdf, 0x18004e96f\nmovaps  xmm3, xmm0                                                     ; +0xe4, 0x18004e974\nmov     r8, rdi                                                        ; +0xe7, 0x18004e977\nmov     rdx, rsi                                                       ; +0xea, 0x18004e97a\nmov     rcx, rbp                                                       ; +0xed, 0x18004e97d\ncall    ?initWithString@CCTexture2D@cocos2d@@QEAA_NPEBD0MAEBVCCSize@2@W4CCTextAlignment@2@W4CCVerticalTextAlignment@2@@Z; cocos2d::CCTexture2D::initWithString(char const *,char const *,float,cocos2d::CCSize const &,cocos2d::CCTextAlignment,cocos2d::CCVerticalTextAlignment) ; +0xf0, 0x18004e980\nlea     rcx, [r14+158h]                                                ; +0xf5, 0x18004e985\nmov     rax, [rcx]                                                     ; +0xfc, 0x18004e98c\nmov     rdx, rbp                                                       ; +0xff, 0x18004e98f\ncall    qword ptr [rax+18h]                                            ; +0x102, 0x18004e992\nmov     rcx, rbp; this                                                 ; +0x105, 0x18004e995\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x108, 0x18004e998\nlea     rdx, unk_1801A83C8; struct cocos2d::CCRect *                   ; +0x10d, 0x18004e99d\nlea     rcx, [rsp+78h+var_38]; this                                    ; +0x114, 0x18004e9a4\ncall    ??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x119, 0x18004e9a9\nmov     rcx, [r14+1A0h]                                                ; +0x11e, 0x18004e9ae\nmov     rax, [rcx]                                                     ; +0x125, 0x18004e9b5\nlea     rdx, [rsp+78h+arg_8]                                           ; +0x128, 0x18004e9b8\ncall    qword ptr [rax+88h]                                            ; +0x130, 0x18004e9c0\nmov     rdx, rax                                                       ; +0x136, 0x18004e9c6\nlea     rcx, [rsp+78h+var_30]                                          ; +0x139, 0x18004e9c9\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x13e, 0x18004e9ce\nmov     rax, [r14]                                                     ; +0x143, 0x18004e9d3\nlea     rdx, [rsp+78h+var_38]                                          ; +0x146, 0x18004e9d6\nmov     rcx, r14                                                       ; +0x14b, 0x18004e9db\ncall    qword ptr [rax+3D0h]                                           ; +0x14e, 0x18004e9de\nmov     al, 1                                                          ; +0x154, 0x18004e9e4\nlea     r11, [rsp+78h+var_18]                                          ; +0x156, 0x18004e9e6\nmov     rbx, [r11+20h]                                                 ; +0x15b, 0x18004e9eb\nmov     rbp, [r11+30h]                                                 ; +0x15f, 0x18004e9ef\nmovaps  xmm6, [rsp+78h+var_28]                                         ; +0x163, 0x18004e9f3\nmov     rsp, r11                                                       ; +0x168, 0x18004e9f8\npop     r14                                                            ; +0x16b, 0x18004e9fb\npop     rdi                                                            ; +0x16d, 0x18004e9fd\npop     rsi                                                            ; +0x16e, 0x18004e9fe\nretn                                                                   ; +0x16f, 0x18004e9ff", "xrefs": ["cocos2d::CCLabelTTF::_updateWithTextDefinition @ 0x18004dcc7", "cocos2d::CCLabelTTF::setDimensions @ 0x18004e6a2", "cocos2d::CCLabelTTF::setFontName @ 0x18004e770", "cocos2d::CCLabelTTF::setFontSize @ 0x18004e7bf", "cocos2d::CCLabelTTF::setHorizontalAlignment @ 0x18004e7e6", "cocos2d::CCLabelTTF::setString @ 0x18004e83d", "cocos2d::CCLabelTTF::setVerticalAlignment @ 0x18004e886", "<???> @ 0x1801438a8", "<???> @ 0x1801b1cec"], "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"}