{"type": "func", "start": 6442477088, "end": 6442477461, "name": "cocos2d::extension::CCControlButton::setBackgroundSpriteForState", "pseudocode": "// \n// cocos2d::extension::CCControlButton::setBackgroundSpriteForState from 0x180006620 to 0x180006795 (373 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x180026748\n// > <???> @ 0x18002a6c0\n// > <???> @ 0x180032408\n// > <???> @ 0x18004b618\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\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 + 67))(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 + 336LL))(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 + 288))(a2, v9);\n  (*((void (__fastcall **)(cocos2d::CCDictionary **, struct cocos2d::extension::CCScale9Sprite *))*this + 58))(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 + 896))(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 + 896))(a2, v13);\n  }\n  if ( *((_DWORD *)this + 109) == a3 )\n    (*((void (__fastcall **)(cocos2d::CCDictionary **))*this + 135))(this);\n}", "assembly": "; \n; cocos2d::extension::CCControlButton::setBackgroundSpriteForState from 0x180006620 to 0x180006795 (373 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x180026748\n; > <???> @ 0x18002a6c0\n; > <???> @ 0x180032408\n; > <???> @ 0x18004b618\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; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x180006620\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x180006625\npush    rsi                                                            ; +0xa, 0x18000662a\npush    rdi                                                            ; +0xb, 0x18000662b\npush    r14                                                            ; +0xc, 0x18000662c\nsub     rsp, 20h                                                       ; +0xe, 0x18000662e\nmov     rsi, rdx                                                       ; +0x12, 0x180006632\nmov     r14d, r8d                                                      ; +0x15, 0x180006635\nlea     rdx, [rcx+1F8h]                                                ; +0x18, 0x180006638\nmov     rdi, rcx                                                       ; +0x1f, 0x18000663f\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x22, 0x180006642\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0x27, 0x180006647\nmov     rcx, [rdi+228h]                                                ; +0x2d, 0x18000664d\nmov     edx, r14d                                                      ; +0x34, 0x180006654\nmov     ebx, r14d                                                      ; +0x37, 0x180006657\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x3a, 0x18000665a\ntest    rax, rax                                                       ; +0x40, 0x180006660\njz      short loc_18000668A                                            ; +0x43, 0x180006663\nmov     rcx, [rdi]                                                     ; +0x45, 0x180006665\nmov     r8b, 1                                                         ; +0x48, 0x180006668\nmov     rdx, rax                                                       ; +0x4b, 0x18000666b\nmov     r9, [rcx+218h]                                                 ; +0x4e, 0x18000666e\nmov     rcx, rdi                                                       ; +0x55, 0x180006675\ncall    r9                                                             ; +0x58, 0x180006678\nmov     rcx, [rdi+228h]                                                ; +0x5b, 0x18000667b\nmov     edx, ebx                                                       ; +0x62, 0x180006682\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAX_J@Z; cocos2d::CCDictionary::removeObjectForKey(__int64) ; +0x64, 0x180006684\nmov     rcx, [rdi+228h]                                                ; +0x6a, 0x18000668a\nmov     r8, rbx                                                        ; +0x71, 0x180006691\nmov     rdx, rsi                                                       ; +0x74, 0x180006694\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x77, 0x180006697\nmov     rax, [rsi]                                                     ; +0x7d, 0x18000669d\nxor     edx, edx                                                       ; +0x80, 0x1800066a0\nmov     rcx, rsi                                                       ; +0x82, 0x1800066a2\ncall    qword ptr [rax+150h]                                           ; +0x85, 0x1800066a5\nmovss   xmm1, cs:dword_18002BBD8                                       ; +0x8b, 0x1800066ab\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x93, 0x1800066b3\nmov     rbx, [rsi]                                                     ; +0x98, 0x1800066b8\nmovaps  xmm2, xmm1                                                     ; +0x9b, 0x1800066bb\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x9e, 0x1800066be\nmov     rdx, rax                                                       ; +0xa4, 0x1800066c4\nmov     rcx, rsi                                                       ; +0xa7, 0x1800066c7\ncall    qword ptr [rbx+120h]                                           ; +0xaa, 0x1800066ca\nmov     rax, [rdi]                                                     ; +0xb0, 0x1800066d0\nmov     rdx, rsi                                                       ; +0xb3, 0x1800066d3\nmov     rcx, rdi                                                       ; +0xb6, 0x1800066d6\ncall    qword ptr [rax+1D0h]                                           ; +0xb9, 0x1800066d9\nmovss   xmm0, dword ptr [rdi+1F8h]                                     ; +0xbf, 0x1800066df\nxorps   xmm1, xmm1                                                     ; +0xc7, 0x1800066e7\nucomiss xmm0, xmm1                                                     ; +0xca, 0x1800066ea\njp      short loc_180006700                                            ; +0xcd, 0x1800066ed\njnz     short loc_180006700                                            ; +0xcf, 0x1800066ef\nmovss   xmm0, dword ptr [rdi+1FCh]                                     ; +0xd1, 0x1800066f1\nucomiss xmm0, xmm1                                                     ; +0xd9, 0x1800066f9\njp      short loc_180006700                                            ; +0xdc, 0x1800066fc\njz      short loc_18000676D                                            ; +0xde, 0x1800066fe\nlea     rdx, [rdi+1F8h]                                                ; +0xe0, 0x180006700\nlea     rcx, [rsp+38h+arg_0]                                           ; +0xe7, 0x180006707\ncall    cs:?equals@CCSize@cocos2d@@QEBA_NAEBV12@@Z; cocos2d::CCSize::equals(cocos2d::CCSize const &) ; +0xec, 0x18000670c\ntest    al, al                                                         ; +0xf2, 0x180006712\njz      short loc_18000674C                                            ; +0xf4, 0x180006714\nmovss   xmm2, [rsp+38h+arg_4]                                          ; +0xf6, 0x180006716\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xfc, 0x18000671c\nmovss   xmm1, [rsp+38h+arg_0]                                          ; +0x101, 0x180006721\naddss   xmm2, cs:dword_18002BBE0                                       ; +0x107, 0x180006727\naddss   xmm1, cs:dword_18002BBE0                                       ; +0x10f, 0x18000672f\nmov     rbx, [rsi]                                                     ; +0x117, 0x180006737\ncall    cs:??0CCSize@cocos2d@@QEAA@MM@Z; cocos2d::CCSize::CCSize(float,float) ; +0x11a, 0x18000673a\nmov     rdx, rax                                                       ; +0x120, 0x180006740\nmov     rcx, rsi                                                       ; +0x123, 0x180006743\ncall    qword ptr [rbx+380h]                                           ; +0x126, 0x180006746\nmov     rbx, [rsi]                                                     ; +0x12c, 0x18000674c\nlea     rdx, [rdi+1F8h]                                                ; +0x12f, 0x18000674f\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x136, 0x180006756\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0x13b, 0x18000675b\nmov     rdx, rax                                                       ; +0x141, 0x180006761\nmov     rcx, rsi                                                       ; +0x144, 0x180006764\ncall    qword ptr [rbx+380h]                                           ; +0x147, 0x180006767\ncmp     [rdi+1B4h], r14d                                               ; +0x14d, 0x18000676d\njnz     short loc_180006782                                            ; +0x154, 0x180006774\nmov     rax, [rdi]                                                     ; +0x156, 0x180006776\nmov     rcx, rdi                                                       ; +0x159, 0x180006779\ncall    qword ptr [rax+438h]                                           ; +0x15c, 0x18000677c\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x162, 0x180006782\nmov     rbp, [rsp+38h+arg_18]                                          ; +0x167, 0x180006787\nadd     rsp, 20h                                                       ; +0x16c, 0x18000678c\npop     r14                                                            ; +0x170, 0x180006790\npop     rdi                                                            ; +0x172, 0x180006792\npop     rsi                                                            ; +0x173, 0x180006793\nretn                                                                   ; +0x174, 0x180006794", "xrefs": ["<???> @ 0x180026748", "<???> @ 0x18002a6c0", "<???> @ 0x180032408", "<???> @ 0x18004b618"], "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"}