{"type": "func", "start": 5371944048, "end": 5371944560, "name": "MoreSearchLayer::onCoins", "pseudocode": "// \n// MoreSearchLayer::onCoins from 0x140315c70 to 0x140315e70 (512 bytes)\n// \n// 2 xrefs:\n// > MoreSearchLayer::init @ 0x1403134dc\n// > <???> @ 0x1406d4934\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 MoreSearchLayer::onCoins(MoreSearchLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // rcx\n  cocos2d::CCString *v3; // rax\n  BOOL v4; // edi\n  void *v5; // rcx\n  __int64 v6; // rbx\n  struct cocos2d::CCString *v7; // rax\n  void *v8; // rcx\n  void *v9; // [rsp+20h] [rbp-50h]\n  void *v10; // [rsp+20h] [rbp-50h]\n  void *Block[2]; // [rsp+28h] [rbp-48h] BYREF\n  __int64 v12; // [rsp+38h] [rbp-38h]\n  unsigned __int64 v13; // [rsp+40h] [rbp-30h]\n  void *v14[2]; // [rsp+48h] [rbp-28h] BYREF\n  __int64 v15; // [rsp+58h] [rbp-18h]\n  unsigned __int64 v16; // [rsp+60h] [rbp-10h]\n\n  v2 = qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v9 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v9);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v2 = qword_1406C2EC0;\n  }\n  v12 = 11;\n  v13 = 15;\n  Block[0] = (void *)0x6C69665F6E696F63LL;\n  Block[1] = (void *)7497076;\n  v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 344), Block);\n  v4 = cocos2d::CCString::boolValue(v3);\n  if ( v13 > 0xF )\n  {\n    v5 = Block[0];\n    if ( v13 + 1 >= 0x1000 )\n    {\n      v5 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v5);\n  }\n  v12 = 0;\n  v13 = 15;\n  LOBYTE(Block[0]) = 0;\n  v6 = qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v10 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v10);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v6 = qword_1406C2EC0;\n  }\n  v15 = 11;\n  v16 = 15;\n  v14[0] = (void *)0x6C69665F6E696F63LL;\n  v14[1] = (void *)7497076;\n  v7 = cocos2d::CCString::createWithFormat(\"%i\", !v4);\n  cocos2d::CCDictionary::setObject(*(_QWORD *)(v6 + 344), v7, v14);\n  if ( v16 > 0xF )\n  {\n    v8 = v14[0];\n    if ( v16 + 1 >= 0x1000 )\n    {\n      v8 = *((void **)v14[0] - 1);\n      if ( (unsigned __int64)((char *)v14[0] - (char *)v8 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v8);\n  }\n}", "assembly": "; \n; MoreSearchLayer::onCoins from 0x140315c70 to 0x140315e70 (512 bytes)\n; \n; 2 xrefs:\n; > MoreSearchLayer::init @ 0x1403134dc\n; > <???> @ 0x1406d4934\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-8+arg_0], rbx                                             ; +0x0, 0x140315c70\nmov     [rsp-8+arg_8], rdi                                             ; +0x5, 0x140315c75\npush    rbp                                                            ; +0xa, 0x140315c7a\nmov     rbp, rsp                                                       ; +0xb, 0x140315c7b\nsub     rsp, 70h                                                       ; +0xe, 0x140315c7e\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x140315c82\nxor     rax, rsp                                                       ; +0x19, 0x140315c89\nmov     [rbp+var_8], rax                                               ; +0x1c, 0x140315c8c\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x20, 0x140315c90\ntest    rcx, rcx                                                       ; +0x27, 0x140315c97\njnz     short loc_140315CCA                                            ; +0x2a, 0x140315c9a\nmov     ecx, 3D0h; Size                                                ; +0x2c, 0x140315c9c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x31, 0x140315ca1\nmov     [rbp+var_50], rax                                              ; +0x36, 0x140315ca6\nmov     rcx, rax                                                       ; +0x3a, 0x140315caa\ncall    sub_140141280                                                  ; +0x3d, 0x140315cad\nnop                                                                    ; +0x42, 0x140315cb2\nmov     cs:qword_1406C2EC0, rax                                        ; +0x43, 0x140315cb3\nmov     rdx, [rax]                                                     ; +0x4a, 0x140315cba\nmov     rcx, rax                                                       ; +0x4d, 0x140315cbd\ncall    qword ptr [rdx+48h]                                            ; +0x50, 0x140315cc0\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x53, 0x140315cc3\nxorps   xmm0, xmm0                                                     ; +0x5a, 0x140315cca\nmovups  xmmword ptr [rbp+Block], xmm0                                  ; +0x5d, 0x140315ccd\nmov     [rbp+var_38], 0Bh                                              ; +0x61, 0x140315cd1\nmov     [rbp+var_30], 0Fh                                              ; +0x69, 0x140315cd9\nmovsd   xmm0, cs:qword_14058AC80                                       ; +0x71, 0x140315ce1\nmovsd   [rbp+Block], xmm0                                              ; +0x79, 0x140315ce9\nmovzx   eax, cs:word_14058AC88                                         ; +0x7e, 0x140315cee\nmov     word ptr [rbp+Block+8], ax                                     ; +0x85, 0x140315cf5\nmovzx   eax, cs:byte_14058AC8A                                         ; +0x89, 0x140315cf9\nmov     byte ptr [rbp+Block+0Ah], al                                   ; +0x90, 0x140315d00\nmov     byte ptr [rbp+Block+0Bh], 0                                    ; +0x93, 0x140315d03\nlea     rdx, [rbp+Block]                                               ; +0x97, 0x140315d07\nmov     rcx, [rcx+158h]                                                ; +0x9b, 0x140315d0b\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 &) ; +0xa2, 0x140315d12\nmov     rcx, rax                                                       ; +0xa8, 0x140315d18\ncall    cs:?boolValue@CCString@cocos2d@@QEBA_NXZ; cocos2d::CCString::boolValue(void) ; +0xab, 0x140315d1b\nmovzx   edi, al                                                        ; +0xb1, 0x140315d21\nmov     rdx, [rbp+var_30]                                              ; +0xb4, 0x140315d24\ncmp     rdx, 0Fh                                                       ; +0xb8, 0x140315d28\njbe     short loc_140315D62                                            ; +0xbc, 0x140315d2c\ninc     rdx                                                            ; +0xbe, 0x140315d2e\nmov     rcx, [rbp+Block]; Block                                        ; +0xc1, 0x140315d31\nmov     rax, rcx                                                       ; +0xc5, 0x140315d35\ncmp     rdx, 1000h                                                     ; +0xc8, 0x140315d38\njb      short loc_140315D5D                                            ; +0xcf, 0x140315d3f\nadd     rdx, 27h ; '''                                                 ; +0xd1, 0x140315d41\nmov     rcx, [rcx-8]                                                   ; +0xd5, 0x140315d45\nsub     rax, rcx                                                       ; +0xd9, 0x140315d49\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xdc, 0x140315d4c\ncmp     rax, 1Fh                                                       ; +0xe0, 0x140315d50\njbe     short loc_140315D5D                                            ; +0xe4, 0x140315d54\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xe6, 0x140315d56\ndb 0CCh                                                                ; +0xec, 0x140315d5c\ncall    j_j_free                                                       ; +0xed, 0x140315d5d\nmov     [rbp+var_38], 0                                                ; +0xf2, 0x140315d62\nmov     [rbp+var_30], 0Fh                                              ; +0xfa, 0x140315d6a\nmov     byte ptr [rbp+Block], 0                                        ; +0x102, 0x140315d72\nmov     rbx, cs:qword_1406C2EC0                                        ; +0x106, 0x140315d76\ntest    rbx, rbx                                                       ; +0x10d, 0x140315d7d\njnz     short loc_140315DB0                                            ; +0x110, 0x140315d80\nmov     ecx, 3D0h; Size                                                ; +0x112, 0x140315d82\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x117, 0x140315d87\nmov     [rbp+var_50], rax                                              ; +0x11c, 0x140315d8c\nmov     rcx, rax                                                       ; +0x120, 0x140315d90\ncall    sub_140141280                                                  ; +0x123, 0x140315d93\nnop                                                                    ; +0x128, 0x140315d98\nmov     cs:qword_1406C2EC0, rax                                        ; +0x129, 0x140315d99\nmov     rdx, [rax]                                                     ; +0x130, 0x140315da0\nmov     rcx, rax                                                       ; +0x133, 0x140315da3\ncall    qword ptr [rdx+48h]                                            ; +0x136, 0x140315da6\nmov     rbx, cs:qword_1406C2EC0                                        ; +0x139, 0x140315da9\nxorps   xmm0, xmm0                                                     ; +0x140, 0x140315db0\nmovups  xmmword ptr [rbp+var_28], xmm0                                 ; +0x143, 0x140315db3\nmov     [rbp+var_18], 0Bh                                              ; +0x147, 0x140315db7\nmov     [rbp+var_10], 0Fh                                              ; +0x14f, 0x140315dbf\nmovsd   xmm0, cs:qword_14058AC80                                       ; +0x157, 0x140315dc7\nmovsd   [rbp+var_28], xmm0                                             ; +0x15f, 0x140315dcf\nmovzx   eax, cs:word_14058AC88                                         ; +0x164, 0x140315dd4\nmov     word ptr [rbp+var_28+8], ax                                    ; +0x16b, 0x140315ddb\nmovzx   eax, cs:byte_14058AC8A                                         ; +0x16f, 0x140315ddf\nmov     byte ptr [rbp+var_28+0Ah], al                                  ; +0x176, 0x140315de6\nmov     byte ptr [rbp+var_28+0Bh], 0                                   ; +0x179, 0x140315de9\nmov     edx, edi                                                       ; +0x17d, 0x140315ded\nxor     edx, 1                                                         ; +0x17f, 0x140315def\nlea     rcx, aI_11; \"%i\"                                               ; +0x182, 0x140315df2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x189, 0x140315df9\nmov     rdx, rax                                                       ; +0x18f, 0x140315dff\nlea     r8, [rbp+var_28]                                               ; +0x192, 0x140315e02\nmov     rcx, [rbx+158h]                                                ; +0x196, 0x140315e06\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 &) ; +0x19d, 0x140315e0d\nnop                                                                    ; +0x1a3, 0x140315e13\nmov     rdx, [rbp+var_10]                                              ; +0x1a4, 0x140315e14\ncmp     rdx, 0Fh                                                       ; +0x1a8, 0x140315e18\njbe     short loc_140315E52                                            ; +0x1ac, 0x140315e1c\ninc     rdx                                                            ; +0x1ae, 0x140315e1e\nmov     rcx, [rbp+var_28]; Block                                       ; +0x1b1, 0x140315e21\nmov     rax, rcx                                                       ; +0x1b5, 0x140315e25\ncmp     rdx, 1000h                                                     ; +0x1b8, 0x140315e28\njb      short loc_140315E4D                                            ; +0x1bf, 0x140315e2f\nadd     rdx, 27h ; '''                                                 ; +0x1c1, 0x140315e31\nmov     rcx, [rcx-8]                                                   ; +0x1c5, 0x140315e35\nsub     rax, rcx                                                       ; +0x1c9, 0x140315e39\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x1cc, 0x140315e3c\ncmp     rax, 1Fh                                                       ; +0x1d0, 0x140315e40\njbe     short loc_140315E4D                                            ; +0x1d4, 0x140315e44\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x1d6, 0x140315e46\ndb 0CCh                                                                ; +0x1dc, 0x140315e4c\ncall    j_j_free                                                       ; +0x1dd, 0x140315e4d\nmov     rcx, [rbp+var_8]                                               ; +0x1e2, 0x140315e52\nxor     rcx, rsp; StackCookie                                          ; +0x1e6, 0x140315e56\ncall    __security_check_cookie                                        ; +0x1e9, 0x140315e59\nlea     r11, [rsp+70h+var_s0]                                          ; +0x1ee, 0x140315e5e\nmov     rbx, [r11+10h]                                                 ; +0x1f3, 0x140315e63\nmov     rdi, [r11+18h]                                                 ; +0x1f7, 0x140315e67\nmov     rsp, r11                                                       ; +0x1fb, 0x140315e6b\npop     rbp                                                            ; +0x1fe, 0x140315e6e\nretn                                                                   ; +0x1ff, 0x140315e6f", "xrefs": ["MoreSearchLayer::init @ 0x1403134dc", "<???> @ 0x1406d4934"], "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"}