{"type": "func", "start": 4295347832, "end": 4295348024, "name": "LevelSearchLayer::demonFilterSelectClosed", "pseudocode": "// \n// LevelSearchLayer::demonFilterSelectClosed from 0x10005ce78 to 0x10005cf38 (192 bytes)\n// \n// 2 xrefs:\n// > sub_10005CF54 @ 0x10005cf58\n// > <???> @ 0x1008becc8\n// \n// This function is hookable on this platform (idp: arm, 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 10:57:48 +0000\n// \n\nvoid __fastcall LevelSearchLayer::demonFilterSelectClosed(__int64 a1, __int64 a2)\n{\n  __int64 v4; // x0\n  __int64 v5; // x0\n  const std::string::value_type *CString; // x0\n  std::string *v7; // x0\n  __int64 v8; // x19\n  __int64 v9; // x0\n  std::string *v10; // x1\n  __int64 v11; // x0\n  std::string v12; // [xsp+8h] [xbp-28h] BYREF\n\n  v4 = GameLevelManager::sharedState(a1);\n  GameLevelManager::setIntForKey(v4, a2, \"demon_filter\");\n  memset(&v12, 0, sizeof(v12));\n  if ( (_DWORD)a2 )\n  {\n    v5 = sub_1003065B0(\"difficulty_%02d_btn2_001.png\", a2);\n    CString = (const std::string::value_type *)cocos2d::CCString::getCString(v5);\n    v7 = std::string::assign(&v12, CString);\n  }\n  else\n  {\n    v7 = std::string::assign(&v12, \"difficulty_06_btn_001.png\");\n  }\n  v8 = *(_QWORD *)(a1 + 488);\n  v9 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v7);\n  if ( (v12.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n    v10 = &v12;\n  else\n    v10 = (std::string *)v12.__r_.__value_.__r.__words[0];\n  v11 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v9, v10);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 1160LL))(v8, v11);\n  if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(v12.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; LevelSearchLayer::demonFilterSelectClosed from 0x10005ce78 to 0x10005cf38 (192 bytes)\n; \n; 2 xrefs:\n; > sub_10005CF54 @ 0x10005cf58\n; > <???> @ 0x1008becc8\n; \n; This function is hookable on this platform (idp: arm, 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 10:57:48 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x10005ce78\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x10005ce7c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x10005ce80\nADD             X29, SP, #0x30                                         ; +0xc, 0x10005ce84\nMOV             X20, X1                                                ; +0x10, 0x10005ce88\nMOV             X19, X0                                                ; +0x14, 0x10005ce8c\nBL              GameLevelManager__sharedState                          ; +0x18, 0x10005ce90\nADRL            X2, aDemonFilter; \"demon_filter\"                       ; +0x1c, 0x10005ce94\nMOV             X1, X20                                                ; +0x24, 0x10005ce9c\nBL              GameLevelManager__setIntForKey                         ; +0x28, 0x10005cea0\nSTP             XZR, XZR, [SP,#0x30+var_28]                            ; +0x2c, 0x10005cea4\nSTR             XZR, [SP,#0x30+var_28.__r_.__value_+0x10]              ; +0x30, 0x10005cea8\nCBZ             W20, loc_10005CED4                                     ; +0x34, 0x10005ceac\nSTR             X20, [SP,#0x30+var_30]                                 ; +0x38, 0x10005ceb0\nADRL            X0, aDifficulty02dB_0; \"difficulty_%02d_btn2_001.png\"  ; +0x3c, 0x10005ceb4\nBL              sub_1003065B0                                          ; +0x44, 0x10005cebc\nBL              cocos2d__CCString__getCString                          ; +0x48, 0x10005cec0\nMOV             X1, X0; __s                                            ; +0x4c, 0x10005cec4\nADD             X0, SP, #0x30+var_28; this                             ; +0x50, 0x10005cec8\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x54, 0x10005cecc\nB               loc_10005CEE4                                          ; +0x58, 0x10005ced0\nADRL            X1, aDifficulty06Bt; \"difficulty_06_btn_001.png\"       ; +0x5c, 0x10005ced4\nADD             X0, SP, #0x30+var_28; this                             ; +0x64, 0x10005cedc\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x68, 0x10005cee0\nLDR             X19, [X19,#0x1E8]                                      ; +0x6c, 0x10005cee4\nBL              cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache    ; +0x70, 0x10005cee8\nLDRSB           W8, [SP,#0x30+var_28.__r_.__value_+0x17]               ; +0x74, 0x10005ceec\nLDR             X9, [SP,#0x30+var_28]                                  ; +0x78, 0x10005cef0\nCMP             W8, #0                                                 ; +0x7c, 0x10005cef4\nADD             X8, SP, #0x30+var_28                                   ; +0x80, 0x10005cef8\nCSEL            X1, X9, X8, LT                                         ; +0x84, 0x10005cefc\nBL              cocos2d__CCSpriteFrameCache__spriteFrameByName         ; +0x88, 0x10005cf00\nMOV             X1, X0                                                 ; +0x8c, 0x10005cf04\nLDR             X8, [X19]                                              ; +0x90, 0x10005cf08\nLDR             X8, [X8,#0x488]                                        ; +0x94, 0x10005cf0c\nMOV             X0, X19                                                ; +0x98, 0x10005cf10\nBLR             X8                                                     ; +0x9c, 0x10005cf14\nLDRSB           W8, [SP,#0x30+var_28.__r_.__value_+0x17]               ; +0xa0, 0x10005cf18\nTBZ             W8, #0x1F, loc_10005CF28                               ; +0xa4, 0x10005cf1c\nLDR             X0, [SP,#0x30+var_28]; __p                             ; +0xa8, 0x10005cf20\nBL              __ZdlPv; operator delete(void *)                       ; +0xac, 0x10005cf24\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xb0, 0x10005cf28\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xb4, 0x10005cf2c\nADD             SP, SP, #0x40 ; '@'                                    ; +0xb8, 0x10005cf30\nRET                                                                    ; +0xbc, 0x10005cf34", "xrefs": ["sub_10005CF54 @ 0x10005cf58", "<???> @ 0x1008becc8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}