{"type": "func", "start": 5373157808, "end": 5373158381, "name": "MoreSearchLayer::onLegendary", "pseudocode": "// \n// MoreSearchLayer::onLegendary from 0x14043e1b0 to 0x14043e3ed (573 bytes)\n// \n// 2 xrefs:\n// > MoreSearchLayer::init @ 0x14043caea\n// > <???> @ 0x140926fc0\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 11:32:20 +0000\n// \n\nvoid MoreSearchLayer::onLegendary()\n{\n  __int64 v0; // rbx\n  cocos2d::CCString *v1; // rax\n  BOOL v2; // edi\n  void *v3; // r8\n  __int64 v4; // rbx\n  __int64 v5; // rbx\n  struct cocos2d::CCString *v6; // rax\n  void *v7; // rcx\n  void *v8; // [rsp+30h] [rbp-58h]\n  void *v9; // [rsp+30h] [rbp-58h]\n  void *Block[2]; // [rsp+38h] [rbp-50h] BYREF\n  __int64 v11; // [rsp+48h] [rbp-40h]\n  unsigned __int64 v12; // [rsp+50h] [rbp-38h]\n  void *v13[2]; // [rsp+58h] [rbp-30h] BYREF\n  __int64 v14; // [rsp+68h] [rbp-20h]\n  unsigned __int64 v15; // [rsp+70h] [rbp-18h]\n\n  v0 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v8 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v8);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v0 = *(_QWORD *)&qword_14090BFB0;\n  }\n  *(_OWORD *)Block = 0;\n  Block[0] = sub_14003D460(0x20u);\n  v11 = 16;\n  v12 = 31;\n  strcpy((char *)Block[0], \"legendary_filter\");\n  v1 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v0 + 848), Block);\n  v2 = cocos2d::CCString::boolValue(v1);\n  if ( v12 > 0xF )\n  {\n    v3 = Block[0];\n    if ( v12 + 1 >= 0x1000 )\n    {\n      v3 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v3);\n  }\n  v11 = 0;\n  v12 = 15;\n  LOBYTE(Block[0]) = 0;\n  v4 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v9 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v9);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v4 = *(_QWORD *)&qword_14090BFB0;\n  }\n  *(_OWORD *)v13 = 0;\n  v14 = 0;\n  v15 = 0;\n  v13[0] = sub_14003D460(0x20u);\n  v14 = 16;\n  v15 = 31;\n  strcpy((char *)v13[0], \"legendary_filter\");\n  v5 = *(_QWORD *)(v4 + 848);\n  v6 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, !v2);\n  cocos2d::CCDictionary::setObject(v5, v6, v13);\n  if ( v15 > 0xF )\n  {\n    v7 = v13[0];\n    if ( v15 + 1 >= 0x1000 )\n    {\n      v7 = *((void **)v13[0] - 1);\n      if ( (unsigned __int64)((char *)v13[0] - (char *)v7 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v7);\n  }\n}", "assembly": "; \n; MoreSearchLayer::onLegendary from 0x14043e1b0 to 0x14043e3ed (573 bytes)\n; \n; 2 xrefs:\n; > MoreSearchLayer::init @ 0x14043caea\n; > <???> @ 0x140926fc0\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 11:32:20 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14043e1b0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x14043e1b5\npush    rdi                                                            ; +0xa, 0x14043e1ba\nsub     rsp, 80h                                                       ; +0xb, 0x14043e1bb\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x14043e1c2\nxor     rax, rsp                                                       ; +0x19, 0x14043e1c9\nmov     [rsp+88h+var_10], rax                                          ; +0x1c, 0x14043e1cc\nmov     rbx, cs:qword_14090BFB0                                        ; +0x21, 0x14043e1d1\ntest    rbx, rbx                                                       ; +0x28, 0x14043e1d8\njnz     short loc_14043E20F                                            ; +0x2b, 0x14043e1db\nmov     ecx, 690h; Size                                                ; +0x2d, 0x14043e1dd\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x32, 0x14043e1e2\nmov     [rsp+88h+var_58], rax                                          ; +0x37, 0x14043e1e7\nmov     rcx, rax                                                       ; +0x3c, 0x14043e1ec\ncall    GameLevelManager__GameLevelManager                             ; +0x3f, 0x14043e1ef\nnop                                                                    ; +0x44, 0x14043e1f4\nmov     cs:qword_14090BFB0, rax                                        ; +0x45, 0x14043e1f5\nmov     rcx, [rax]                                                     ; +0x4c, 0x14043e1fc\nmov     rdx, [rcx+48h]                                                 ; +0x4f, 0x14043e1ff\nmov     rcx, rax                                                       ; +0x53, 0x14043e203\ncall    rdx                                                            ; +0x56, 0x14043e206\nmov     rbx, cs:qword_14090BFB0                                        ; +0x58, 0x14043e208\nxorps   xmm0, xmm0                                                     ; +0x5f, 0x14043e20f\nmovups  xmmword ptr [rsp+88h+Block], xmm0                              ; +0x62, 0x14043e212\nxor     esi, esi                                                       ; +0x67, 0x14043e217\nmov     [rsp+88h+var_40], rsi                                          ; +0x69, 0x14043e219\nmov     [rsp+88h+var_38], rsi                                          ; +0x6e, 0x14043e21e\nmov     ecx, 20h ; ' '                                                 ; +0x73, 0x14043e223\ncall    sub_14003D460                                                  ; +0x78, 0x14043e228\nmov     [rsp+88h+Block], rax                                           ; +0x7d, 0x14043e22d\nmov     [rsp+88h+var_40], 10h                                          ; +0x82, 0x14043e232\nmov     [rsp+88h+var_38], 1Fh                                          ; +0x8b, 0x14043e23b\nmovups  xmm0, cs:xmmword_140790188                                     ; +0x94, 0x14043e244\nmovups  xmmword ptr [rax], xmm0                                        ; +0x9b, 0x14043e24b\nmov     [rax+10h], sil                                                 ; +0x9e, 0x14043e24e\nlea     rdx, [rsp+88h+Block]                                           ; +0xa2, 0x14043e252\nmov     rcx, [rbx+350h]                                                ; +0xa7, 0x14043e257\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0xae, 0x14043e25e\nmov     rcx, rax                                                       ; +0xb4, 0x14043e264\ncall    cs:?boolValue@CCString@cocos2d@@QEBA_NXZ; cocos2d::CCString::boolValue(void) ; +0xb7, 0x14043e267\nmovzx   edi, al                                                        ; +0xbd, 0x14043e26d\nmov     rdx, [rsp+88h+var_38]                                          ; +0xc0, 0x14043e270\ncmp     rdx, 0Fh                                                       ; +0xc5, 0x14043e275\njbe     short loc_14043E2C2                                            ; +0xc9, 0x14043e279\ninc     rdx                                                            ; +0xcb, 0x14043e27b\nmov     r8, [rsp+88h+Block]                                            ; +0xce, 0x14043e27e\nmov     rcx, r8                                                        ; +0xd3, 0x14043e283\ncmp     rdx, 1000h                                                     ; +0xd6, 0x14043e286\njb      short loc_14043E2BA                                            ; +0xdd, 0x14043e28d\nadd     rdx, 27h ; '''                                                 ; +0xdf, 0x14043e28f\nmov     r8, [r8-8]                                                     ; +0xe3, 0x14043e293\nsub     rcx, r8                                                        ; +0xe7, 0x14043e297\nsub     rcx, 8                                                         ; +0xea, 0x14043e29a\ncmp     rcx, 1Fh                                                       ; +0xee, 0x14043e29e\njbe     short loc_14043E2BA                                            ; +0xf2, 0x14043e2a2\nmov     [rsp+88h+Reserved], rsi; Reserved                              ; +0xf4, 0x14043e2a4\nxor     r9d, r9d; LineNo                                               ; +0xf9, 0x14043e2a9\nxor     r8d, r8d; FileName                                             ; +0xfc, 0x14043e2ac\nxor     edx, edx; FunctionName                                         ; +0xff, 0x14043e2af\nxor     ecx, ecx; Expression                                           ; +0x101, 0x14043e2b1\ncall    cs:_invoke_watson                                              ; +0x103, 0x14043e2b3\nalign 2                                                                ; +0x109, 0x14043e2b9\nmov     rcx, r8; Block                                                 ; +0x10a, 0x14043e2ba\ncall    j_j_free                                                       ; +0x10d, 0x14043e2bd\nmov     [rsp+88h+var_40], rsi                                          ; +0x112, 0x14043e2c2\nmov     [rsp+88h+var_38], 0Fh                                          ; +0x117, 0x14043e2c7\nmov     byte ptr [rsp+88h+Block], 0                                    ; +0x120, 0x14043e2d0\nmov     rbx, cs:qword_14090BFB0                                        ; +0x125, 0x14043e2d5\ntest    rbx, rbx                                                       ; +0x12c, 0x14043e2dc\njnz     short loc_14043E310                                            ; +0x12f, 0x14043e2df\nmov     ecx, 690h; Size                                                ; +0x131, 0x14043e2e1\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x136, 0x14043e2e6\nmov     [rsp+88h+var_58], rax                                          ; +0x13b, 0x14043e2eb\nmov     rcx, rax                                                       ; +0x140, 0x14043e2f0\ncall    GameLevelManager__GameLevelManager                             ; +0x143, 0x14043e2f3\nnop                                                                    ; +0x148, 0x14043e2f8\nmov     cs:qword_14090BFB0, rax                                        ; +0x149, 0x14043e2f9\nmov     rdx, [rax]                                                     ; +0x150, 0x14043e300\nmov     rcx, rax                                                       ; +0x153, 0x14043e303\ncall    qword ptr [rdx+48h]                                            ; +0x156, 0x14043e306\nmov     rbx, cs:qword_14090BFB0                                        ; +0x159, 0x14043e309\nxorps   xmm0, xmm0                                                     ; +0x160, 0x14043e310\nmovups  xmmword ptr [rsp+88h+var_30], xmm0                             ; +0x163, 0x14043e313\nmov     [rsp+88h+var_20], rsi                                          ; +0x168, 0x14043e318\nmov     [rsp+88h+var_18], rsi                                          ; +0x16d, 0x14043e31d\nmov     ecx, 20h ; ' '                                                 ; +0x172, 0x14043e322\ncall    sub_14003D460                                                  ; +0x177, 0x14043e327\nmov     [rsp+88h+var_30], rax                                          ; +0x17c, 0x14043e32c\nmov     [rsp+88h+var_20], 10h                                          ; +0x181, 0x14043e331\nmov     [rsp+88h+var_18], 1Fh                                          ; +0x18a, 0x14043e33a\nmovups  xmm0, cs:xmmword_140790188                                     ; +0x193, 0x14043e343\nmovups  xmmword ptr [rax], xmm0                                        ; +0x19a, 0x14043e34a\nmov     byte ptr [rax+10h], 0                                          ; +0x19d, 0x14043e34d\nmov     rbx, [rbx+350h]                                                ; +0x1a1, 0x14043e351\nmov     edx, edi                                                       ; +0x1a8, 0x14043e358\nxor     edx, 1                                                         ; +0x1aa, 0x14043e35a\nlea     rcx, word_1406ED6F8                                            ; +0x1ad, 0x14043e35d\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1b4, 0x14043e364\nmov     rdx, rax                                                       ; +0x1ba, 0x14043e36a\nlea     r8, [rsp+88h+var_30]                                           ; +0x1bd, 0x14043e36d\nmov     rcx, rbx                                                       ; +0x1c2, 0x14043e372\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x1c5, 0x14043e375\nnop                                                                    ; +0x1cb, 0x14043e37b\nmov     rdx, [rsp+88h+var_18]                                          ; +0x1cc, 0x14043e37c\ncmp     rdx, 0Fh                                                       ; +0x1d1, 0x14043e381\njbe     short loc_14043E3CB                                            ; +0x1d5, 0x14043e385\ninc     rdx                                                            ; +0x1d7, 0x14043e387\nmov     rcx, [rsp+88h+var_30]; Block                                   ; +0x1da, 0x14043e38a\nmov     rax, rcx                                                       ; +0x1df, 0x14043e38f\ncmp     rdx, 1000h                                                     ; +0x1e2, 0x14043e392\njb      short loc_14043E3C6                                            ; +0x1e9, 0x14043e399\nadd     rdx, 27h ; '''                                                 ; +0x1eb, 0x14043e39b\nmov     rcx, [rcx-8]                                                   ; +0x1ef, 0x14043e39f\nsub     rax, rcx                                                       ; +0x1f3, 0x14043e3a3\nsub     rax, 8                                                         ; +0x1f6, 0x14043e3a6\ncmp     rax, 1Fh                                                       ; +0x1fa, 0x14043e3aa\njbe     short loc_14043E3C6                                            ; +0x1fe, 0x14043e3ae\nmov     [rsp+88h+Reserved], rsi; Reserved                              ; +0x200, 0x14043e3b0\nxor     r9d, r9d; LineNo                                               ; +0x205, 0x14043e3b5\nxor     r8d, r8d; FileName                                             ; +0x208, 0x14043e3b8\nxor     edx, edx; FunctionName                                         ; +0x20b, 0x14043e3bb\nxor     ecx, ecx; Expression                                           ; +0x20d, 0x14043e3bd\ncall    cs:_invoke_watson                                              ; +0x20f, 0x14043e3bf\nalign 2                                                                ; +0x215, 0x14043e3c5\ncall    j_j_free                                                       ; +0x216, 0x14043e3c6\nmov     rcx, [rsp+88h+var_10]                                          ; +0x21b, 0x14043e3cb\nxor     rcx, rsp; StackCookie                                          ; +0x220, 0x14043e3d0\ncall    __security_check_cookie                                        ; +0x223, 0x14043e3d3\nlea     r11, [rsp+88h+var_8]                                           ; +0x228, 0x14043e3d8\nmov     rbx, [r11+10h]                                                 ; +0x230, 0x14043e3e0\nmov     rsi, [r11+18h]                                                 ; +0x234, 0x14043e3e4\nmov     rsp, r11                                                       ; +0x238, 0x14043e3e8\npop     rdi                                                            ; +0x23b, 0x14043e3eb\nretn                                                                   ; +0x23c, 0x14043e3ec", "xrefs": ["MoreSearchLayer::init @ 0x14043caea", "<???> @ 0x140926fc0"], "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"}