{"type": "func", "start": 5371607632, "end": 5371607958, "name": "LeaderboardsLayer::isCorrect", "pseudocode": "// \n// LeaderboardsLayer::isCorrect from 0x1402c3a50 to 0x1402c3b96 (326 bytes)\n// \n// 3 xrefs:\n// > LeaderboardsLayer::loadLeaderboardFinished @ 0x1402c38c5\n// > LeaderboardsLayer::loadLeaderboardFailed @ 0x1402c3980\n// > <???> @ 0x1406d2a8c\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\n// Hidden C++ exception states: #wind=2\n_BOOL8 __fastcall LeaderboardsLayer::isCorrect(__int64 a1, _QWORD *a2)\n{\n  int v4; // esi\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  size_t v7; // r8\n  bool v8; // di\n  void *v9; // rcx\n  void *v11; // [rsp+20h] [rbp-48h]\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int64 v13; // [rsp+40h] [rbp-28h]\n  unsigned __int64 v14; // [rsp+48h] [rbp-20h]\n\n  if ( *(_DWORD *)(a1 + 440) == 3 )\n    v4 = 0;\n  else\n    v4 = *(_DWORD *)(a1 + 444);\n  if ( !qword_1406C2EC0 )\n  {\n    v11 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v11);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n  }\n  v5 = cocos2d::CCString::createWithFormat(\"lb_%i_%i\", *(_DWORD *)(a1 + 440), v4);\n  CString = cocos2d::CCString::getCString(v5);\n  *(_OWORD *)Block = 0;\n  v13 = 0;\n  v14 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( CString[v7] );\n  sub_14003A930(Block, CString, v7);\n  v8 = sub_14003A760(Block, a2) == 0;\n  if ( v14 > 0xF )\n  {\n    v9 = Block[0];\n    if ( v14 + 1 >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v9);\n  }\n  sub_14003A830((__int64)a2);\n  return v8;\n}", "assembly": "; \n; LeaderboardsLayer::isCorrect from 0x1402c3a50 to 0x1402c3b96 (326 bytes)\n; \n; 3 xrefs:\n; > LeaderboardsLayer::loadLeaderboardFinished @ 0x1402c38c5\n; > LeaderboardsLayer::loadLeaderboardFailed @ 0x1402c3980\n; > <???> @ 0x1406d2a8c\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+arg_10], rbx                                              ; +0x0, 0x1402c3a50\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1402c3a55\npush    rdi                                                            ; +0xa, 0x1402c3a5a\nsub     rsp, 60h                                                       ; +0xb, 0x1402c3a5b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1402c3a5f\nxor     rax, rsp                                                       ; +0x16, 0x1402c3a66\nmov     [rsp+68h+var_18], rax                                          ; +0x19, 0x1402c3a69\nmov     rbx, rdx                                                       ; +0x1e, 0x1402c3a6e\nmov     rdi, rcx                                                       ; +0x21, 0x1402c3a71\nmov     [rsp+68h+var_40], rdx                                          ; +0x24, 0x1402c3a74\ncmp     dword ptr [rcx+1B8h], 3                                        ; +0x29, 0x1402c3a79\njnz     short loc_1402C3A86                                            ; +0x30, 0x1402c3a80\nxor     esi, esi                                                       ; +0x32, 0x1402c3a82\njmp     short loc_1402C3A8C                                            ; +0x34, 0x1402c3a84\nmov     esi, [rcx+1BCh]                                                ; +0x36, 0x1402c3a86\ncmp     cs:qword_1406C2EC0, 0                                          ; +0x3c, 0x1402c3a8c\njnz     short loc_1402C3ABE                                            ; +0x44, 0x1402c3a94\nmov     ecx, 3D0h; Size                                                ; +0x46, 0x1402c3a96\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x4b, 0x1402c3a9b\nmov     [rsp+68h+var_48], rax                                          ; +0x50, 0x1402c3aa0\nmov     rcx, rax                                                       ; +0x55, 0x1402c3aa5\ncall    sub_140141280                                                  ; +0x58, 0x1402c3aa8\nnop                                                                    ; +0x5d, 0x1402c3aad\nmov     cs:qword_1406C2EC0, rax                                        ; +0x5e, 0x1402c3aae\nmov     rdx, [rax]                                                     ; +0x65, 0x1402c3ab5\nmov     rcx, rax                                                       ; +0x68, 0x1402c3ab8\ncall    qword ptr [rdx+48h]                                            ; +0x6b, 0x1402c3abb\nmov     r8d, esi                                                       ; +0x6e, 0x1402c3abe\nmov     edx, [rdi+1B8h]                                                ; +0x71, 0x1402c3ac1\nlea     rcx, aLbII; \"lb_%i_%i\"                                         ; +0x77, 0x1402c3ac7\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x7e, 0x1402c3ace\nmov     rcx, rax                                                       ; +0x84, 0x1402c3ad4\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x87, 0x1402c3ad7\nxorps   xmm0, xmm0                                                     ; +0x8d, 0x1402c3add\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x90, 0x1402c3ae0\nmov     [rsp+68h+var_28], 0                                            ; +0x95, 0x1402c3ae5\nmov     [rsp+68h+var_20], 0                                            ; +0x9e, 0x1402c3aee\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xa7, 0x1402c3af7\nxchg    ax, ax                                                         ; +0xae, 0x1402c3afe\ninc     r8                                                             ; +0xb0, 0x1402c3b00\ncmp     byte ptr [rax+r8], 0                                           ; +0xb3, 0x1402c3b03\njnz     short loc_1402C3B00                                            ; +0xb8, 0x1402c3b08\nmov     rdx, rax                                                       ; +0xba, 0x1402c3b0a\nlea     rcx, [rsp+68h+Block]                                           ; +0xbd, 0x1402c3b0d\ncall    sub_14003A930                                                  ; +0xc2, 0x1402c3b12\nmov     rdx, rbx; Buf2                                                 ; +0xc7, 0x1402c3b17\nlea     rcx, [rsp+68h+Block]; Buf1                                     ; +0xca, 0x1402c3b1a\ncall    sub_14003A760                                                  ; +0xcf, 0x1402c3b1f\ntest    eax, eax                                                       ; +0xd4, 0x1402c3b24\nsetz    dil                                                            ; +0xd6, 0x1402c3b26\nmov     rdx, [rsp+68h+var_20]                                          ; +0xda, 0x1402c3b2a\ncmp     rdx, 0Fh                                                       ; +0xdf, 0x1402c3b2f\njbe     short loc_1402C3B6B                                            ; +0xe3, 0x1402c3b33\ninc     rdx                                                            ; +0xe5, 0x1402c3b35\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0xe8, 0x1402c3b38\nmov     rax, rcx                                                       ; +0xed, 0x1402c3b3d\ncmp     rdx, 1000h                                                     ; +0xf0, 0x1402c3b40\njb      short loc_1402C3B65                                            ; +0xf7, 0x1402c3b47\nadd     rdx, 27h ; '''                                                 ; +0xf9, 0x1402c3b49\nmov     rcx, [rcx-8]                                                   ; +0xfd, 0x1402c3b4d\nsub     rax, rcx                                                       ; +0x101, 0x1402c3b51\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x104, 0x1402c3b54\ncmp     rax, 1Fh                                                       ; +0x108, 0x1402c3b58\njbe     short loc_1402C3B65                                            ; +0x10c, 0x1402c3b5c\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x10e, 0x1402c3b5e\ndb 0CCh                                                                ; +0x114, 0x1402c3b64\ncall    j_j_free                                                       ; +0x115, 0x1402c3b65\nnop                                                                    ; +0x11a, 0x1402c3b6a\nmov     rcx, rbx                                                       ; +0x11b, 0x1402c3b6b\ncall    sub_14003A830                                                  ; +0x11e, 0x1402c3b6e\nmovzx   eax, dil                                                       ; +0x123, 0x1402c3b73\nmov     rcx, [rsp+68h+var_18]                                          ; +0x127, 0x1402c3b77\nxor     rcx, rsp; StackCookie                                          ; +0x12c, 0x1402c3b7c\ncall    __security_check_cookie                                        ; +0x12f, 0x1402c3b7f\nlea     r11, [rsp+68h+var_8]                                           ; +0x134, 0x1402c3b84\nmov     rbx, [r11+20h]                                                 ; +0x139, 0x1402c3b89\nmov     rsi, [r11+28h]                                                 ; +0x13d, 0x1402c3b8d\nmov     rsp, r11                                                       ; +0x141, 0x1402c3b91\npop     rdi                                                            ; +0x144, 0x1402c3b94\nretn                                                                   ; +0x145, 0x1402c3b95", "xrefs": ["LeaderboardsLayer::loadLeaderboardFinished @ 0x1402c38c5", "LeaderboardsLayer::loadLeaderboardFailed @ 0x1402c3980", "<???> @ 0x1406d2a8c"], "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"}