{"type": "func", "start": 6442475040, "end": 6442475279, "name": "cocos2d::extension::CCControlButton::getTitleForState", "pseudocode": "// \n// cocos2d::extension::CCControlButton::getTitleForState from 0x180005e20 to 0x180005f0f (239 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1800266e0\n// > <???> @ 0x18002a658\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b570\n// > <???> @ 0x18004b57c\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 12:15:36 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCString *__fastcall cocos2d::extension::CCControlButton::getTitleForState(\n        cocos2d::extension::CCControlButton *this,\n        unsigned int a2)\n{\n  cocos2d::CCDictionary *v3; // rcx\n  struct cocos2d::CCString *result; // rax\n  __int64 v5; // rbx\n  void *v6; // r8\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __m128i si128; // [rsp+40h] [rbp-28h]\n\n  v3 = *((cocos2d::CCDictionary **)this + 66);\n  if ( v3 )\n  {\n    result = cocos2d::CCDictionary::objectForKey(v3, a2);\n    if ( !result )\n      return cocos2d::CCDictionary::objectForKey(*((cocos2d::CCDictionary **)this + 66), 1);\n  }\n  else\n  {\n    *(_OWORD *)Block = 0;\n    si128 = _mm_load_si128((const __m128i *)&xmmword_18002BCB0);\n    LOBYTE(Block[0]) = 0;\n    v5 = cocos2d::CCString::create(Block);\n    if ( si128.m128i_i64[1] > 0xFuLL )\n    {\n      v6 = Block[0];\n      if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n      {\n        v6 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v6);\n    }\n    return (struct cocos2d::CCString *)v5;\n  }\n  return result;\n}", "assembly": "; \n; cocos2d::extension::CCControlButton::getTitleForState from 0x180005e20 to 0x180005f0f (239 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1800266e0\n; > <???> @ 0x18002a658\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b570\n; > <???> @ 0x18004b57c\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 12:15:36 +0000\n; \npush    rbx                                                            ; +0x0, 0x180005e20\nsub     rsp, 60h                                                       ; +0x2, 0x180005e22\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x180005e26\nxor     rax, rsp                                                       ; +0xd, 0x180005e2d\nmov     [rsp+68h+var_18], rax                                          ; +0x10, 0x180005e30\nmov     rbx, rcx                                                       ; +0x15, 0x180005e35\nmov     rcx, [rcx+210h]                                                ; +0x18, 0x180005e38\ntest    rcx, rcx                                                       ; +0x1f, 0x180005e3f\njz      short loc_180005E7A                                            ; +0x22, 0x180005e42\nmov     edx, edx                                                       ; +0x24, 0x180005e44\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x26, 0x180005e46\ntest    rax, rax                                                       ; +0x2c, 0x180005e4c\njnz     loc_180005EFC                                                  ; +0x2f, 0x180005e4f\nmov     edx, 1                                                         ; +0x35, 0x180005e55\nmov     rcx, [rbx+210h]                                                ; +0x3a, 0x180005e5a\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x41, 0x180005e61\nmov     rcx, [rsp+68h+var_18]                                          ; +0x47, 0x180005e67\nxor     rcx, rsp; StackCookie                                          ; +0x4c, 0x180005e6c\ncall    __security_check_cookie                                        ; +0x4f, 0x180005e6f\nadd     rsp, 60h                                                       ; +0x54, 0x180005e74\npop     rbx                                                            ; +0x58, 0x180005e78\nretn                                                                   ; +0x59, 0x180005e79\nxorps   xmm0, xmm0                                                     ; +0x5a, 0x180005e7a\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x5d, 0x180005e7d\nmovdqa  xmm1, cs:xmmword_18002BCB0                                     ; +0x62, 0x180005e82\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x6a, 0x180005e8a\nmov     byte ptr [rsp+68h+Block], 0                                    ; +0x70, 0x180005e90\nlea     rcx, [rsp+68h+Block]                                           ; +0x75, 0x180005e95\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 &) ; +0x7a, 0x180005e9a\nmov     rbx, rax                                                       ; +0x80, 0x180005ea0\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0x83, 0x180005ea3\ncmp     rdx, 0Fh                                                       ; +0x88, 0x180005ea8\njbe     short loc_180005EF9                                            ; +0x8c, 0x180005eac\ninc     rdx                                                            ; +0x8e, 0x180005eae\nmov     r8, [rsp+68h+Block]                                            ; +0x91, 0x180005eb1\nmov     rcx, r8                                                        ; +0x96, 0x180005eb6\ncmp     rdx, 1000h                                                     ; +0x99, 0x180005eb9\njb      short loc_180005EF1                                            ; +0xa0, 0x180005ec0\nadd     rdx, 27h ; '''                                                 ; +0xa2, 0x180005ec2\nmov     r8, [r8-8]                                                     ; +0xa6, 0x180005ec6\nsub     rcx, r8                                                        ; +0xaa, 0x180005eca\nsub     rcx, 8                                                         ; +0xad, 0x180005ecd\ncmp     rcx, 1Fh                                                       ; +0xb1, 0x180005ed1\njbe     short loc_180005EF1                                            ; +0xb5, 0x180005ed5\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xb7, 0x180005ed7\nxor     r9d, r9d; LineNo                                               ; +0xc0, 0x180005ee0\nxor     r8d, r8d; FileName                                             ; +0xc3, 0x180005ee3\nxor     edx, edx; FunctionName                                         ; +0xc6, 0x180005ee6\nxor     ecx, ecx; Expression                                           ; +0xc8, 0x180005ee8\ncall    cs:_invoke_watson                                              ; +0xca, 0x180005eea\ndb 0CCh                                                                ; +0xd0, 0x180005ef0\nmov     rcx, r8; Block                                                 ; +0xd1, 0x180005ef1\ncall    j_j_free                                                       ; +0xd4, 0x180005ef4\nmov     rax, rbx                                                       ; +0xd9, 0x180005ef9\nmov     rcx, [rsp+68h+var_18]                                          ; +0xdc, 0x180005efc\nxor     rcx, rsp; StackCookie                                          ; +0xe1, 0x180005f01\ncall    __security_check_cookie                                        ; +0xe4, 0x180005f04\nadd     rsp, 60h                                                       ; +0xe9, 0x180005f09\npop     rbx                                                            ; +0xed, 0x180005f0d\nretn                                                                   ; +0xee, 0x180005f0e", "xrefs": ["<???> @ 0x1800266e0", "<???> @ 0x18002a658", "<???> @ 0x180032408", "<???> @ 0x18004b570", "<???> @ 0x18004b57c"], "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"}