{"type": "func", "start": 6442478480, "end": 6442478850, "name": "cocos2d::extension::CCControlButton::setBackgroundSpriteForState", "pseudocode": "// \n// cocos2d::extension::CCControlButton::setBackgroundSpriteForState from 0x180006b90 to 0x180006d02 (370 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x180024200\n// > <???> @ 0x180028048\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x1800496cc\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\nvoid __fastcall cocos2d::extension::CCControlButton::setBackgroundSpriteForState(\n        cocos2d::CCDictionary **this,\n        struct cocos2d::extension::CCScale9Sprite *a2,\n        unsigned int a3)\n{\n  struct cocos2d::CCObject *v6; // rax\n  __int64 v7; // r8\n  __int64 v8; // rbx\n  __int64 v9; // rax\n  __int64 v10; // rbx\n  __int64 v11; // rax\n  __int64 v12; // rbx\n  __int64 v13; // rax\n  float v14; // [rsp+40h] [rbp+8h] BYREF\n  float v15; // [rsp+44h] [rbp+Ch]\n  char v16; // [rsp+48h] [rbp+10h] BYREF\n\n  cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v14, (const struct cocos2d::CCSize *)(this + 63));\n  v6 = cocos2d::CCDictionary::objectForKey(*(this + 69), a3);\n  if ( v6 )\n  {\n    LOBYTE(v7) = 1;\n    (*((void (__fastcall **)(cocos2d::CCDictionary **, struct cocos2d::CCObject *, __int64))*this + 65))(this, v6, v7);\n    cocos2d::CCDictionary::removeObjectForKey(*(this + 69), a3);\n  }\n  cocos2d::CCDictionary::setObject(*(this + 69), a2, a3);\n  (*(void (__fastcall **)(struct cocos2d::extension::CCScale9Sprite *, _QWORD))(*(_QWORD *)a2 + 320LL))(a2, 0);\n  v8 = *(_QWORD *)a2;\n  v9 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v16, 0.5, 0.5);\n  (*(void (__fastcall **)(struct cocos2d::extension::CCScale9Sprite *, __int64))(v8 + 272))(a2, v9);\n  (*((void (__fastcall **)(cocos2d::CCDictionary **, struct cocos2d::extension::CCScale9Sprite *))*this + 56))(this, a2);\n  if ( *((float *)this + 126) != 0.0 || *((float *)this + 127) != 0.0 )\n  {\n    if ( cocos2d::CCSize::equals((cocos2d::CCSize *)&v14, (const struct cocos2d::CCSize *)(this + 63)) )\n    {\n      v10 = *(_QWORD *)a2;\n      v11 = cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v16, v14 + 1.0, v15 + 1.0);\n      (*(void (__fastcall **)(struct cocos2d::extension::CCScale9Sprite *, __int64))(v10 + 880))(a2, v11);\n    }\n    v12 = *(_QWORD *)a2;\n    v13 = cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v16, (const struct cocos2d::CCSize *)(this + 63));\n    (*(void (__fastcall **)(struct cocos2d::extension::CCScale9Sprite *, __int64))(v12 + 880))(a2, v13);\n  }\n  if ( *((_DWORD *)this + 109) == a3 )\n    (*((void (__fastcall **)(cocos2d::CCDictionary **))*this + 133))(this);\n}", "assembly": "; \n; cocos2d::extension::CCControlButton::setBackgroundSpriteForState from 0x180006b90 to 0x180006d02 (370 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x180024200\n; > <???> @ 0x180028048\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x1800496cc\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_10], rbx                                              ; +0x0, 0x180006b90\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x180006b95\npush    rsi                                                            ; +0xa, 0x180006b9a\npush    rdi                                                            ; +0xb, 0x180006b9b\npush    r14                                                            ; +0xc, 0x180006b9c\nsub     rsp, 20h                                                       ; +0xe, 0x180006b9e\nmov     rsi, rdx                                                       ; +0x12, 0x180006ba2\nmov     r14d, r8d                                                      ; +0x15, 0x180006ba5\nlea     rdx, [rcx+1F8h]                                                ; +0x18, 0x180006ba8\nmov     rdi, rcx                                                       ; +0x1f, 0x180006baf\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x22, 0x180006bb2\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0x27, 0x180006bb7\nmov     rcx, [rdi+228h]                                                ; +0x2d, 0x180006bbd\nmov     edx, r14d                                                      ; +0x34, 0x180006bc4\nmov     ebx, r14d                                                      ; +0x37, 0x180006bc7\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x3a, 0x180006bca\ntest    rax, rax                                                       ; +0x40, 0x180006bd0\njz      short loc_180006BF7                                            ; +0x43, 0x180006bd3\nmov     r9, [rdi]                                                      ; +0x45, 0x180006bd5\nmov     r8b, 1                                                         ; +0x48, 0x180006bd8\nmov     rdx, rax                                                       ; +0x4b, 0x180006bdb\nmov     rcx, rdi                                                       ; +0x4e, 0x180006bde\ncall    qword ptr [r9+208h]                                            ; +0x51, 0x180006be1\nmov     rcx, [rdi+228h]                                                ; +0x58, 0x180006be8\nmov     edx, ebx                                                       ; +0x5f, 0x180006bef\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAX_J@Z; cocos2d::CCDictionary::removeObjectForKey(__int64) ; +0x61, 0x180006bf1\nmov     rcx, [rdi+228h]                                                ; +0x67, 0x180006bf7\nmov     r8, rbx                                                        ; +0x6e, 0x180006bfe\nmov     rdx, rsi                                                       ; +0x71, 0x180006c01\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x74, 0x180006c04\nmov     rax, [rsi]                                                     ; +0x7a, 0x180006c0a\nxor     edx, edx                                                       ; +0x7d, 0x180006c0d\nmov     rcx, rsi                                                       ; +0x7f, 0x180006c0f\ncall    qword ptr [rax+140h]                                           ; +0x82, 0x180006c12\nmovss   xmm1, cs:dword_180029510                                       ; +0x88, 0x180006c18\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x90, 0x180006c20\nmov     rbx, [rsi]                                                     ; +0x95, 0x180006c25\nmovaps  xmm2, xmm1                                                     ; +0x98, 0x180006c28\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x9b, 0x180006c2b\nmov     rdx, rax                                                       ; +0xa1, 0x180006c31\nmov     rcx, rsi                                                       ; +0xa4, 0x180006c34\ncall    qword ptr [rbx+110h]                                           ; +0xa7, 0x180006c37\nmov     rax, [rdi]                                                     ; +0xad, 0x180006c3d\nmov     rdx, rsi                                                       ; +0xb0, 0x180006c40\nmov     rcx, rdi                                                       ; +0xb3, 0x180006c43\ncall    qword ptr [rax+1C0h]                                           ; +0xb6, 0x180006c46\nmovss   xmm0, dword ptr [rdi+1F8h]                                     ; +0xbc, 0x180006c4c\nxorps   xmm1, xmm1                                                     ; +0xc4, 0x180006c54\nucomiss xmm0, xmm1                                                     ; +0xc7, 0x180006c57\njp      short loc_180006C6D                                            ; +0xca, 0x180006c5a\njnz     short loc_180006C6D                                            ; +0xcc, 0x180006c5c\nmovss   xmm0, dword ptr [rdi+1FCh]                                     ; +0xce, 0x180006c5e\nucomiss xmm0, xmm1                                                     ; +0xd6, 0x180006c66\njp      short loc_180006C6D                                            ; +0xd9, 0x180006c69\njz      short loc_180006CDA                                            ; +0xdb, 0x180006c6b\nlea     rdx, [rdi+1F8h]                                                ; +0xdd, 0x180006c6d\nlea     rcx, [rsp+38h+arg_0]                                           ; +0xe4, 0x180006c74\ncall    cs:?equals@CCSize@cocos2d@@QEBA_NAEBV12@@Z; cocos2d::CCSize::equals(cocos2d::CCSize const &) ; +0xe9, 0x180006c79\ntest    al, al                                                         ; +0xef, 0x180006c7f\njz      short loc_180006CB9                                            ; +0xf1, 0x180006c81\nmovss   xmm2, [rsp+38h+arg_4]                                          ; +0xf3, 0x180006c83\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xf9, 0x180006c89\nmovss   xmm1, [rsp+38h+arg_0]                                          ; +0xfe, 0x180006c8e\naddss   xmm2, cs:dword_180029518                                       ; +0x104, 0x180006c94\naddss   xmm1, cs:dword_180029518                                       ; +0x10c, 0x180006c9c\nmov     rbx, [rsi]                                                     ; +0x114, 0x180006ca4\ncall    cs:??0CCSize@cocos2d@@QEAA@MM@Z; cocos2d::CCSize::CCSize(float,float) ; +0x117, 0x180006ca7\nmov     rdx, rax                                                       ; +0x11d, 0x180006cad\nmov     rcx, rsi                                                       ; +0x120, 0x180006cb0\ncall    qword ptr [rbx+370h]                                           ; +0x123, 0x180006cb3\nmov     rbx, [rsi]                                                     ; +0x129, 0x180006cb9\nlea     rdx, [rdi+1F8h]                                                ; +0x12c, 0x180006cbc\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x133, 0x180006cc3\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0x138, 0x180006cc8\nmov     rdx, rax                                                       ; +0x13e, 0x180006cce\nmov     rcx, rsi                                                       ; +0x141, 0x180006cd1\ncall    qword ptr [rbx+370h]                                           ; +0x144, 0x180006cd4\ncmp     [rdi+1B4h], r14d                                               ; +0x14a, 0x180006cda\njnz     short loc_180006CEF                                            ; +0x151, 0x180006ce1\nmov     rax, [rdi]                                                     ; +0x153, 0x180006ce3\nmov     rcx, rdi                                                       ; +0x156, 0x180006ce6\ncall    qword ptr [rax+428h]                                           ; +0x159, 0x180006ce9\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x15f, 0x180006cef\nmov     rbp, [rsp+38h+arg_18]                                          ; +0x164, 0x180006cf4\nadd     rsp, 20h                                                       ; +0x169, 0x180006cf9\npop     r14                                                            ; +0x16d, 0x180006cfd\npop     rdi                                                            ; +0x16f, 0x180006cff\npop     rsi                                                            ; +0x170, 0x180006d00\nretn                                                                   ; +0x171, 0x180006d01", "xrefs": ["<???> @ 0x180024200", "<???> @ 0x180028048", "<???> @ 0x18002fdf8", "<???> @ 0x1800496cc"], "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"}