{"type": "func", "start": 7884888, "end": 7885106, "name": "EditorSoundConfigInfoLayer::refreshLikeState", "pseudocode": "// \n// EditorSoundConfigInfoLayer::refreshLikeState from 0x785058 to 0x785132 (218 bytes)\n// \n// 2 xrefs:\n// > EditorSoundConfigInfoLayer::likedItem @ 0x7851a6\n// > EditorSoundConfigInfoLayer::init @ 0x787ee6\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:59:32 +0000\n// \n\n_DWORD *__fastcall EditorSoundConfigInfoLayer::refreshLikeState(_DWORD *this, int a2, char *a3, int a4)\n{\n  _DWORD *v4; // r6\n  int v5; // r2\n  GameLevelManager *v6; // r0\n  int v7; // r0\n  int v8; // r4\n  const char *v9; // r7\n  cocos2d::CCSpriteFrameCache *v10; // r4\n  int (__fastcall *v11)(cocos2d::CCSpriteFrameCache *, int); // r8\n  cocos2d::CCSpriteFrameCache *v12; // r0\n  int v13; // r0\n  int v14; // r7\n  void (__fastcall *v15)(int, char *); // r8\n  char *v16; // r1\n  _DWORD v17[2]; // [sp+0h] [bp-10h] BYREF\n  char *v18; // [sp+8h] [bp-8h]\n  int v19; // [sp+Ch] [bp-4h]\n\n  v17[0] = this;\n  v17[1] = a2;\n  v18 = a3;\n  v19 = a4;\n  v4 = this;\n  v5 = *(this + 187);\n  if ( v5 )\n  {\n    if ( *(_BYTE *)(v5 + 385) )\n    {\n      v8 = 1;\n    }\n    else\n    {\n      v6 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)this);\n      if ( v6 )\n      {\n        v7 = GameLevelManager::sharedState(v6);\n        v6 = (GameLevelManager *)GameLevelManager::hasLikedItemFullCheck(v7, &byte_5);\n      }\n      v8 = (int)v6;\n    }\n    this = (_DWORD *)v4[192];\n    if ( this )\n    {\n      (*(void (__fastcall **)(_DWORD *, int))(*this + 528))(this, (unsigned __int8)v8 ^ 1);\n      if ( v8 )\n        v9 = \"GJ_like2Btn2_001.png\";\n      else\n        v9 = \"GJ_like2Btn_001.png\";\n      v10 = (cocos2d::CCSpriteFrameCache *)(*(int (__fastcall **)(_DWORD))(*(_DWORD *)v4[192] + 536))(v4[192]);\n      v11 = *(int (__fastcall **)(cocos2d::CCSpriteFrameCache *, int))(*(_DWORD *)v10 + 580);\n      v12 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v10);\n      v13 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v12, v9);\n      this = (_DWORD *)v11(v10, v13);\n    }\n    v14 = v4[193];\n    if ( v14 )\n    {\n      v15 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v14 + 464);\n      GameToolbox::intToShortString((GameToolbox *)v17, *(_DWORD *)(v4[187] + 296), 0);\n      if ( (v17[0] & 1) != 0 )\n        v16 = v18;\n      else\n        v16 = (char *)v17 + 1;\n      v15(v14, v16);\n      return (_DWORD *)std::string::~string((int)v17);\n    }\n  }\n  return this;\n}", "assembly": "; \n; EditorSoundConfigInfoLayer::refreshLikeState from 0x785058 to 0x785132 (218 bytes)\n; \n; 2 xrefs:\n; > EditorSoundConfigInfoLayer::likedItem @ 0x7851a6\n; > EditorSoundConfigInfoLayer::init @ 0x787ee6\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:59:32 +0000\n; \nPUSH.W          {R0-R8,LR}                                             ; +0x0, 0x785058\nMOV             R6, R0                                                 ; +0x4, 0x78505c\nLDR             R3, =(__stack_chk_guard_ptr - 0x785064)                ; +0x6, 0x78505e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x8, 0x785060\nLDR             R3, [R3]; __stack_chk_guard                            ; +0xa, 0x785062\nLDR             R2, [R3]                                               ; +0xc, 0x785064\nMOV             R5, R3                                                 ; +0xe, 0x785066\nSTR             R2, [SP,#0x10+var_4]                                   ; +0x10, 0x785068\nLDR.W           R2, [R0,#0x2EC]                                        ; +0x12, 0x78506a\nCMP             R2, #0                                                 ; +0x16, 0x78506e\nBEQ             loc_785120                                             ; +0x18, 0x785070\nLDRB.W          R4, [R2,#0x181]                                        ; +0x1a, 0x785072\nCBNZ            R4, loc_785094                                         ; +0x1e, 0x785076\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x20, 0x785078\nCBZ             R0, loc_785098                                         ; +0x24, 0x78507c\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x26, 0x78507e\nLDR.W           R3, [R6,#0x2EC]                                        ; +0x2a, 0x785082\nMOVS            R1, #5                                                 ; +0x2e, 0x785086\nLDR.W           R2, [R3,#0x108]                                        ; +0x30, 0x785088\nMOV             R3, R4                                                 ; +0x34, 0x78508c\nBL              _ZN16GameLevelManager21hasLikedItemFullCheckE12LikeItemTypeii; GameLevelManager::hasLikedItemFullCheck(LikeItemType,int,int) ; +0x36, 0x78508e\nB               loc_785098                                             ; +0x3a, 0x785092\nMOVS            R4, #1                                                 ; +0x3c, 0x785094\nB               loc_78509A                                             ; +0x3e, 0x785096\nMOV             R4, R0                                                 ; +0x40, 0x785098\nLDR.W           R0, [R6,#0x300]                                        ; +0x42, 0x78509a\nCBZ             R0, loc_7850DE                                         ; +0x46, 0x78509e\nLDR             R3, [R0]                                               ; +0x48, 0x7850a0\nEOR.W           R1, R4, #1                                             ; +0x4a, 0x7850a2\nUXTB            R1, R1                                                 ; +0x4e, 0x7850a6\nLDR.W           R3, [R3,#0x210]                                        ; +0x50, 0x7850a8\nBLX             R3                                                     ; +0x54, 0x7850ac\nCBNZ            R4, loc_7850B6                                         ; +0x56, 0x7850ae\nLDR             R7, =(aGjLike2btn001P - 0x7850B6); \"GJ_like2Btn_001.png\" ; +0x58, 0x7850b0\nADD             R7, PC; \"GJ_like2Btn_001.png\"                          ; +0x5a, 0x7850b2\nB               loc_7850BA                                             ; +0x5c, 0x7850b4\nLDR             R7, =(aGjLike2btn2001 - 0x7850BC); \"GJ_like2Btn2_001.png\" ; +0x5e, 0x7850b6\nADD             R7, PC; \"GJ_like2Btn2_001.png\"                         ; +0x60, 0x7850b8\nLDR.W           R0, [R6,#0x300]                                        ; +0x62, 0x7850ba\nLDR             R3, [R0]                                               ; +0x66, 0x7850be\nLDR.W           R3, [R3,#0x218]                                        ; +0x68, 0x7850c0\nBLX             R3                                                     ; +0x6c, 0x7850c4\nLDR             R3, [R0]                                               ; +0x6e, 0x7850c6\nMOV             R4, R0                                                 ; +0x70, 0x7850c8\nLDR.W           R8, [R3,#0x244]                                        ; +0x72, 0x7850ca\nBL              _ZN7cocos2d18CCSpriteFrameCache22sharedSpriteFrameCacheEv; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0x76, 0x7850ce\nMOV             R1, R7; char *                                         ; +0x7a, 0x7850d2\nBL              _ZN7cocos2d18CCSpriteFrameCache17spriteFrameByNameEPKc; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const*) ; +0x7c, 0x7850d4\nMOV             R1, R0                                                 ; +0x80, 0x7850d8\nMOV             R0, R4                                                 ; +0x82, 0x7850da\nBLX             R8                                                     ; +0x84, 0x7850dc\nLDR.W           R7, [R6,#0x304]                                        ; +0x86, 0x7850de\nCBZ             R7, loc_785120                                         ; +0x8a, 0x7850e2\nLDR             R3, [R7]                                               ; +0x8c, 0x7850e4\nMOV             R0, SP; this                                           ; +0x8e, 0x7850e6\nMOVS            R2, #0; bool                                           ; +0x90, 0x7850e8\nMOV             R4, SP                                                 ; +0x92, 0x7850ea\nLDR.W           R8, [R3,#0x1D0]                                        ; +0x94, 0x7850ec\nLDR.W           R3, [R6,#0x2EC]                                        ; +0x98, 0x7850f0\nLDR.W           R1, [R3,#0x128]; int                                   ; +0x9c, 0x7850f4\nBL              _ZN11GameToolbox16intToShortStringEib; GameToolbox::intToShortString(int,bool) ; +0xa0, 0x7850f8\nLDRB.W          R3, [SP,#0x10+var_10]                                  ; +0xa4, 0x7850fc\nMOV             R0, R7                                                 ; +0xa8, 0x785100\nLSLS            R3, R3, #0x1F                                          ; +0xaa, 0x785102\nITE PL                                                                 ; +0xac, 0x785104\nADDPL.W         R1, SP, #0x10+var_F                                    ; +0xae, 0x785106\nLDRMI           R1, [SP,#0x10+var_8]                                   ; +0xb2, 0x78510a\nBLX             R8                                                     ; +0xb4, 0x78510c\nMOV             R0, SP                                                 ; +0xb6, 0x78510e\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xb8, 0x785110\nB               loc_785120                                             ; +0xbc, 0x785114\nMOV             R0, R4                                                 ; +0xbe, 0x785116\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xc0, 0x785118\nBL              __cxa_end_cleanup                                      ; +0xc4, 0x78511c\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xc8, 0x785120\nLDR             R3, [R5]                                               ; +0xca, 0x785122\nCMP             R2, R3                                                 ; +0xcc, 0x785124\nBEQ             loc_78512C                                             ; +0xce, 0x785126\nBLX             __stack_chk_fail                                       ; +0xd0, 0x785128\nADD             SP, SP, #0x10                                          ; +0xd4, 0x78512c\nPOP.W           {R4-R8,PC}                                             ; +0xd6, 0x78512e", "xrefs": ["EditorSoundConfigInfoLayer::likedItem @ 0x7851a6", "EditorSoundConfigInfoLayer::init @ 0x787ee6"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}