{"type": "func", "start": 6442477440, "end": 6442477691, "name": "cocos2d::extension::CCControlButton::setTitleTTFForState", "pseudocode": "// \n// cocos2d::extension::CCControlButton::setTitleTTFForState from 0x180006780 to 0x18000687b (251 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1800241c8\n// > <???> @ 0x180028010\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x180049678\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\nvoid __fastcall cocos2d::extension::CCControlButton::setTitleTTFForState(\n        cocos2d::extension::CCControlButton *this,\n        const char *a2,\n        unsigned int a3)\n{\n  cocos2d::CCString *v6; // rdi\n  void *v7; // rcx\n  __int64 v8; // rbx\n  const char *CString; // rax\n  struct cocos2d::CCLabelTTF *v10; // rax\n  void *Block[2]; // [rsp+20h] [rbp-58h] BYREF\n  __int64 v12; // [rsp+30h] [rbp-48h]\n  unsigned __int64 v13; // [rsp+38h] [rbp-40h]\n\n  v6 = (cocos2d::CCString *)(*(__int64 (__fastcall **)(cocos2d::extension::CCControlButton *, _QWORD))(*(_QWORD *)this + 1192LL))(\n                              this,\n                              a3);\n  if ( !v6 )\n  {\n    *(_OWORD *)Block = 0;\n    v12 = 0;\n    v13 = 15;\n    LOBYTE(Block[0]) = 0;\n    v6 = (cocos2d::CCString *)cocos2d::CCString::create(Block);\n    if ( v13 > 0xF )\n    {\n      v7 = Block[0];\n      if ( v13 + 1 >= 0x1000 )\n      {\n        v7 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v7);\n    }\n    v12 = 0;\n    v13 = 15;\n    LOBYTE(Block[0]) = 0;\n  }\n  v8 = *(_QWORD *)this;\n  CString = cocos2d::CCString::getCString(v6);\n  v10 = cocos2d::CCLabelTTF::create(CString, a2, 12.0);\n  (*(void (__fastcall **)(cocos2d::extension::CCControlButton *, struct cocos2d::CCLabelTTF *, _QWORD))(v8 + 1232))(\n    this,\n    v10,\n    a3);\n}", "assembly": "; \n; cocos2d::extension::CCControlButton::setTitleTTFForState from 0x180006780 to 0x18000687b (251 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1800241c8\n; > <???> @ 0x180028010\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x180049678\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\npush    rbx                                                            ; +0x0, 0x180006780\npush    rbp                                                            ; +0x2, 0x180006782\npush    rsi                                                            ; +0x3, 0x180006783\npush    rdi                                                            ; +0x4, 0x180006784\npush    r14                                                            ; +0x5, 0x180006785\nsub     rsp, 50h                                                       ; +0x7, 0x180006787\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x18000678b\nxor     rax, rsp                                                       ; +0x12, 0x180006792\nmov     [rsp+78h+var_38], rax                                          ; +0x15, 0x180006795\nmov     ebp, r8d                                                       ; +0x1a, 0x18000679a\nmov     r14, rdx                                                       ; +0x1d, 0x18000679d\nmov     rsi, rcx                                                       ; +0x20, 0x1800067a0\nmov     rax, [rcx]                                                     ; +0x23, 0x1800067a3\nmov     edx, r8d                                                       ; +0x26, 0x1800067a6\ncall    qword ptr [rax+4A8h]                                           ; +0x29, 0x1800067a9\nmov     rdi, rax                                                       ; +0x2f, 0x1800067af\ntest    rax, rax                                                       ; +0x32, 0x1800067b2\njnz     short loc_180006834                                            ; +0x35, 0x1800067b5\nxorps   xmm0, xmm0                                                     ; +0x37, 0x1800067b7\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x3a, 0x1800067ba\nxor     ebx, ebx                                                       ; +0x3f, 0x1800067bf\nmov     [rsp+78h+var_48], rbx                                          ; +0x41, 0x1800067c1\nmov     [rsp+78h+var_40], 0Fh                                          ; +0x46, 0x1800067c6\nmov     byte ptr [rsp+78h+Block], bl                                   ; +0x4f, 0x1800067cf\nlea     rcx, [rsp+78h+Block]                                           ; +0x53, 0x1800067d3\ncall    cs:?create@CCString@cocos2d@@SAPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCString::create(std::string const &) ; +0x58, 0x1800067d8\nmov     rdi, rax                                                       ; +0x5e, 0x1800067de\nmov     rdx, [rsp+78h+var_40]                                          ; +0x61, 0x1800067e1\ncmp     rdx, 0Fh                                                       ; +0x66, 0x1800067e6\njbe     short loc_180006821                                            ; +0x6a, 0x1800067ea\ninc     rdx                                                            ; +0x6c, 0x1800067ec\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0x6f, 0x1800067ef\nmov     rax, rcx                                                       ; +0x74, 0x1800067f4\ncmp     rdx, 1000h                                                     ; +0x77, 0x1800067f7\njb      short loc_18000681C                                            ; +0x7e, 0x1800067fe\nadd     rdx, 27h ; '''                                                 ; +0x80, 0x180006800\nmov     rcx, [rcx-8]                                                   ; +0x84, 0x180006804\nsub     rax, rcx                                                       ; +0x88, 0x180006808\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x8b, 0x18000680b\ncmp     rax, 1Fh                                                       ; +0x8f, 0x18000680f\njbe     short loc_18000681C                                            ; +0x93, 0x180006813\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x95, 0x180006815\nalign 4                                                                ; +0x9b, 0x18000681b\ncall    j_j_free                                                       ; +0x9c, 0x18000681c\nmov     [rsp+78h+var_48], rbx                                          ; +0xa1, 0x180006821\nmov     [rsp+78h+var_40], 0Fh                                          ; +0xa6, 0x180006826\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0xaf, 0x18000682f\nmov     rbx, [rsi]                                                     ; +0xb4, 0x180006834\nmov     rcx, rdi                                                       ; +0xb7, 0x180006837\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xba, 0x18000683a\nmov     rcx, rax                                                       ; +0xc0, 0x180006840\nmovss   xmm2, cs:dword_180029590                                       ; +0xc3, 0x180006843\nmov     rdx, r14                                                       ; +0xcb, 0x18000684b\ncall    cs:?create@CCLabelTTF@cocos2d@@SAPEAV12@PEBD0M@Z; cocos2d::CCLabelTTF::create(char const *,char const *,float) ; +0xce, 0x18000684e\nmov     rdx, rax                                                       ; +0xd4, 0x180006854\nmov     r8d, ebp                                                       ; +0xd7, 0x180006857\nmov     rcx, rsi                                                       ; +0xda, 0x18000685a\ncall    qword ptr [rbx+4D0h]                                           ; +0xdd, 0x18000685d\nmov     rcx, [rsp+78h+var_38]                                          ; +0xe3, 0x180006863\nxor     rcx, rsp; StackCookie                                          ; +0xe8, 0x180006868\ncall    __security_check_cookie                                        ; +0xeb, 0x18000686b\nadd     rsp, 50h                                                       ; +0xf0, 0x180006870\npop     r14                                                            ; +0xf4, 0x180006874\npop     rdi                                                            ; +0xf6, 0x180006876\npop     rsi                                                            ; +0xf7, 0x180006877\npop     rbp                                                            ; +0xf8, 0x180006878\npop     rbx                                                            ; +0xf9, 0x180006879\nretn                                                                   ; +0xfa, 0x18000687a", "xrefs": ["<???> @ 0x1800241c8", "<???> @ 0x180028010", "<???> @ 0x18002fdf8", "<???> @ 0x180049678"], "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"}