{"type": "func", "start": 5372456640, "end": 5372457234, "name": "GJPathsLayer::onPath", "pseudocode": "// \n// GJPathsLayer::onPath from 0x140392ec0 to 0x140393112 (594 bytes)\n// \n// 3 xrefs:\n// > GJPathsLayer::init @ 0x140392cf5\n// > <???> @ 0x14092306c\n// > <???> @ 0x140923078\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:31:11 +0000\n// \n\n// Hidden C++ exception states: #wind=5\nvoid __fastcall GJPathsLayer::onPath(__int64 a1, __int64 a2)\n{\n  __int64 v3; // rdi\n  _BYTE *v4; // rax\n  __int64 v5; // rbx\n  _QWORD *v6; // rax\n  int Stat; // ebx\n  __int64 v8; // rcx\n  __int64 v9; // rbx\n  _QWORD *v10; // rax\n  bool isSpecialChestUnlocked; // bl\n  _QWORD *v12; // rbx\n  __int64 (__fastcall *v13)(__int64); // rdx\n  void *v14; // [rsp+20h] [rbp-78h]\n  void *v15; // [rsp+20h] [rbp-78h]\n  _BYTE v16[32]; // [rsp+28h] [rbp-70h] BYREF\n  _QWORD v17[4]; // [rsp+48h] [rbp-50h] BYREF\n  _QWORD v18[4]; // [rsp+68h] [rbp-30h] BYREF\n\n  v3 = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  v4 = (_BYTE *)GJPathPage::create(v3, a1);\n  v4[596] = 1;\n  (*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 1064LL))(v4);\n  v5 = qword_14090BFE0;\n  if ( !qword_14090BFE0 )\n  {\n    v14 = operator new(0x3E8u);\n    qword_14090BFE0 = sub_1402D6480((__int64)v14);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n    v5 = qword_14090BFE0;\n  }\n  v6 = GameToolbox::intToString(v18, (int)v3 + 29);\n  if ( v6[3] > 0xFu )\n    v6 = (_QWORD *)*v6;\n  Stat = GameStatsManager::getStat(v5, v6);\n  sub_14003D310((__int64)v18);\n  if ( Stat >= 1000 )\n  {\n    v9 = qword_14090BFE0;\n    if ( !qword_14090BFE0 )\n    {\n      v15 = operator new(0x3E8u);\n      qword_14090BFE0 = sub_1402D6480((__int64)v15);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n      v9 = qword_14090BFE0;\n    }\n    GameStatsManager::getPathRewardKey(v8, v17, v3);\n    v10 = (_QWORD *)sub_14003F4F0((__int64)v16, (__int64)v17);\n    isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v9, v10);\n    sub_14003D310((__int64)v17);\n    if ( !isSpecialChestUnlocked )\n    {\n      v12 = operator new(0x2A0u);\n      FLAlertLayer::FLAlertLayer((__int64)v12);\n      *v12 = &GJPathRewardPopup::`vftable';\n      v12[40] = &GJPathRewardPopup::`vftable';\n      v12[41] = &GJPathRewardPopup::`vftable';\n      v12[42] = &GJPathRewardPopup::`vftable';\n      v12[43] = &GJPathRewardPopup::`vftable';\n      v12[44] = &GJPathRewardPopup::`vftable';\n      v12[51] = &GJPathRewardPopup::`vftable';\n      v12[54] = &GJPathRewardPopup::`vftable';\n      v12[68] = &GJPathRewardPopup::`vftable';\n      *((_DWORD *)v12 + 166) = 0;\n      if ( (unsigned __int8)GJPathRewardPopup::init(v12, (unsigned int)v3) )\n      {\n        cocos2d::CCObject::autorelease((cocos2d::CCObject *)v12);\n      }\n      else\n      {\n        (*(void (__fastcall **)(_QWORD *, __int64))(*v12 + 8LL))(v12, 1);\n        v12 = nullptr;\n      }\n      v13 = *(__int64 (__fastcall **)(__int64))(*v12 + 1064LL);\n      if ( v13 == FLAlertLayer::show )\n        FLAlertLayer::show((__int64)v12);\n      else\n        v13((__int64)v12);\n    }\n  }\n}", "assembly": "; \n; GJPathsLayer::onPath from 0x140392ec0 to 0x140393112 (594 bytes)\n; \n; 3 xrefs:\n; > GJPathsLayer::init @ 0x140392cf5\n; > <???> @ 0x14092306c\n; > <???> @ 0x140923078\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:31:11 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140392ec0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x140392ec5\npush    rdi                                                            ; +0xa, 0x140392eca\nsub     rsp, 90h                                                       ; +0xb, 0x140392ecb\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x140392ed2\nxor     rax, rsp                                                       ; +0x19, 0x140392ed9\nmov     [rsp+98h+var_10], rax                                          ; +0x1c, 0x140392edc\nmov     rbx, rcx                                                       ; +0x24, 0x140392ee4\nmov     rax, [rdx]                                                     ; +0x27, 0x140392ee7\nmov     rcx, rdx                                                       ; +0x2a, 0x140392eea\ncall    qword ptr [rax+38h]                                            ; +0x2d, 0x140392eed\nmov     edi, eax                                                       ; +0x30, 0x140392ef0\nmov     rdx, rbx                                                       ; +0x32, 0x140392ef2\nmov     ecx, eax                                                       ; +0x35, 0x140392ef5\ncall    GJPathPage__create                                             ; +0x37, 0x140392ef7\nmov     byte ptr [rax+254h], 1                                         ; +0x3c, 0x140392efc\nmov     rcx, [rax]                                                     ; +0x43, 0x140392f03\nmov     rdx, [rcx+428h]                                                ; +0x46, 0x140392f06\nmov     rcx, rax                                                       ; +0x4d, 0x140392f0d\ncall    rdx                                                            ; +0x50, 0x140392f10\nmov     rbx, cs:qword_14090BFE0                                        ; +0x52, 0x140392f12\ntest    rbx, rbx                                                       ; +0x59, 0x140392f19\njnz     short loc_140392F51                                            ; +0x5c, 0x140392f1c\nmov     ecx, 3E8h; Size                                                ; +0x5e, 0x140392f1e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x63, 0x140392f23\nmov     [rsp+98h+var_78], rax                                          ; +0x68, 0x140392f28\nmov     rcx, rax                                                       ; +0x6d, 0x140392f2d\ncall    sub_1402D6480                                                  ; +0x70, 0x140392f30\nnop                                                                    ; +0x75, 0x140392f35\nmov     cs:qword_14090BFE0, rax                                        ; +0x76, 0x140392f36\nmov     rcx, [rax]                                                     ; +0x7d, 0x140392f3d\nmov     r8, [rcx+48h]                                                  ; +0x80, 0x140392f40\nmov     rcx, rax                                                       ; +0x84, 0x140392f44\ncall    r8                                                             ; +0x87, 0x140392f47\nmov     rbx, cs:qword_14090BFE0                                        ; +0x8a, 0x140392f4a\nlea     edx, [rdi+1Dh]                                                 ; +0x91, 0x140392f51\nlea     rcx, [rsp+98h+var_30]                                          ; +0x94, 0x140392f54\ncall    GameToolbox__intToString                                       ; +0x99, 0x140392f59\nnop                                                                    ; +0x9e, 0x140392f5e\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x9f, 0x140392f5f\njbe     short loc_140392F69                                            ; +0xa4, 0x140392f64\nmov     rax, [rax]                                                     ; +0xa6, 0x140392f66\nmov     rdx, rax                                                       ; +0xa9, 0x140392f69\nmov     rcx, rbx                                                       ; +0xac, 0x140392f6c\ncall    GameStatsManager__getStat                                      ; +0xaf, 0x140392f6f\nmov     ebx, eax                                                       ; +0xb4, 0x140392f74\nlea     rcx, [rsp+98h+var_30]                                          ; +0xb6, 0x140392f76\ncall    sub_14003D310                                                  ; +0xbb, 0x140392f7b\ncmp     ebx, 3E8h                                                      ; +0xc0, 0x140392f80\njl      loc_1403930ED                                                  ; +0xc6, 0x140392f86\nmov     rbx, cs:qword_14090BFE0                                        ; +0xcc, 0x140392f8c\ntest    rbx, rbx                                                       ; +0xd3, 0x140392f93\njnz     short loc_140392FCA                                            ; +0xd6, 0x140392f96\nmov     ecx, 3E8h; Size                                                ; +0xd8, 0x140392f98\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xdd, 0x140392f9d\nmov     [rsp+98h+var_78], rax                                          ; +0xe2, 0x140392fa2\nmov     rcx, rax                                                       ; +0xe7, 0x140392fa7\ncall    sub_1402D6480                                                  ; +0xea, 0x140392faa\nnop                                                                    ; +0xef, 0x140392faf\nmov     cs:qword_14090BFE0, rax                                        ; +0xf0, 0x140392fb0\nmov     rcx, [rax]                                                     ; +0xf7, 0x140392fb7\nmov     rdx, [rcx+48h]                                                 ; +0xfa, 0x140392fba\nmov     rcx, rax                                                       ; +0xfe, 0x140392fbe\ncall    rdx                                                            ; +0x101, 0x140392fc1\nmov     rbx, cs:qword_14090BFE0                                        ; +0x103, 0x140392fc3\nmov     r8d, edi                                                       ; +0x10a, 0x140392fca\nlea     rdx, [rsp+98h+var_50]                                          ; +0x10d, 0x140392fcd\ncall    GameStatsManager__getPathRewardKey                             ; +0x112, 0x140392fd2\nnop                                                                    ; +0x117, 0x140392fd7\nlea     rdx, [rsp+98h+var_50]                                          ; +0x118, 0x140392fd8\nlea     rcx, [rsp+98h+var_70]                                          ; +0x11d, 0x140392fdd\ncall    sub_14003F4F0                                                  ; +0x122, 0x140392fe2\nmov     rdx, rax                                                       ; +0x127, 0x140392fe7\nmov     rcx, rbx                                                       ; +0x12a, 0x140392fea\ncall    GameStatsManager__isSpecialChestUnlocked                       ; +0x12d, 0x140392fed\nmovzx   ebx, al                                                        ; +0x132, 0x140392ff2\nlea     rcx, [rsp+98h+var_50]                                          ; +0x135, 0x140392ff5\ncall    sub_14003D310                                                  ; +0x13a, 0x140392ffa\ntest    bl, bl                                                         ; +0x13f, 0x140392fff\njnz     loc_1403930ED                                                  ; +0x141, 0x140393001\nmov     ecx, 2A0h; Size                                                ; +0x147, 0x140393007\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x14c, 0x14039300c\nmov     rbx, rax                                                       ; +0x151, 0x140393011\nmov     [rsp+98h+var_78], rax                                          ; +0x154, 0x140393014\nmov     rcx, rax                                                       ; +0x159, 0x140393019\ncall    FLAlertLayer__FLAlertLayer                                     ; +0x15c, 0x14039301c\nlea     rax, ??_7GJPathRewardPopup@@6B@; const GJPathRewardPopup::`vftable' ; +0x161, 0x140393021\nmov     [rbx], rax                                                     ; +0x168, 0x140393028\nlea     rax, ??_7GJPathRewardPopup@@6B@_0; const GJPathRewardPopup::`vftable' ; +0x16b, 0x14039302b\nmov     [rbx+140h], rax                                                ; +0x172, 0x140393032\nlea     rax, ??_7GJPathRewardPopup@@6B@_1; const GJPathRewardPopup::`vftable' ; +0x179, 0x140393039\nmov     [rbx+148h], rax                                                ; +0x180, 0x140393040\nlea     rax, ??_7GJPathRewardPopup@@6B@_2; const GJPathRewardPopup::`vftable' ; +0x187, 0x140393047\nmov     [rbx+150h], rax                                                ; +0x18e, 0x14039304e\nlea     rax, ??_7GJPathRewardPopup@@6B@_3; const GJPathRewardPopup::`vftable' ; +0x195, 0x140393055\nmov     [rbx+158h], rax                                                ; +0x19c, 0x14039305c\nlea     rax, ??_7GJPathRewardPopup@@6B@_4; const GJPathRewardPopup::`vftable' ; +0x1a3, 0x140393063\nmov     [rbx+160h], rax                                                ; +0x1aa, 0x14039306a\nlea     rax, ??_7GJPathRewardPopup@@6B@_5; const GJPathRewardPopup::`vftable' ; +0x1b1, 0x140393071\nmov     [rbx+198h], rax                                                ; +0x1b8, 0x140393078\nlea     rax, ??_7GJPathRewardPopup@@6B@_6; const GJPathRewardPopup::`vftable' ; +0x1bf, 0x14039307f\nmov     [rbx+1B0h], rax                                                ; +0x1c6, 0x140393086\nlea     rax, ??_7GJPathRewardPopup@@6B@_7; const GJPathRewardPopup::`vftable' ; +0x1cd, 0x14039308d\nmov     [rbx+220h], rax                                                ; +0x1d4, 0x140393094\nmov     dword ptr [rbx+298h], 0                                        ; +0x1db, 0x14039309b\nmov     edx, edi                                                       ; +0x1e5, 0x1403930a5\nmov     rcx, rbx                                                       ; +0x1e7, 0x1403930a7\ncall    GJPathRewardPopup__init                                        ; +0x1ea, 0x1403930aa\nmov     rcx, rbx                                                       ; +0x1ef, 0x1403930af\ntest    al, al                                                         ; +0x1f2, 0x1403930b2\njz      short loc_1403930BE                                            ; +0x1f4, 0x1403930b4\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x1f6, 0x1403930b6\njmp     short loc_1403930CB                                            ; +0x1fc, 0x1403930bc\nmov     rax, [rbx]                                                     ; +0x1fe, 0x1403930be\nmov     edx, 1                                                         ; +0x201, 0x1403930c1\ncall    qword ptr [rax+8]                                              ; +0x206, 0x1403930c6\nxor     ebx, ebx                                                       ; +0x209, 0x1403930c9\nmov     rax, [rbx]                                                     ; +0x20b, 0x1403930cb\nmov     rdx, [rax+428h]                                                ; +0x20e, 0x1403930ce\nlea     rax, FLAlertLayer__show                                        ; +0x215, 0x1403930d5\nmov     rcx, rbx                                                       ; +0x21c, 0x1403930dc\ncmp     rdx, rax                                                       ; +0x21f, 0x1403930df\njnz     short loc_1403930EB                                            ; +0x222, 0x1403930e2\ncall    FLAlertLayer__show                                             ; +0x224, 0x1403930e4\njmp     short loc_1403930ED                                            ; +0x229, 0x1403930e9\ncall    rdx                                                            ; +0x22b, 0x1403930eb\nmov     rcx, [rsp+98h+var_10]                                          ; +0x22d, 0x1403930ed\nxor     rcx, rsp; StackCookie                                          ; +0x235, 0x1403930f5\ncall    __security_check_cookie                                        ; +0x238, 0x1403930f8\nlea     r11, [rsp+98h+var_8]                                           ; +0x23d, 0x1403930fd\nmov     rbx, [r11+20h]                                                 ; +0x245, 0x140393105\nmov     rsi, [r11+28h]                                                 ; +0x249, 0x140393109\nmov     rsp, r11                                                       ; +0x24d, 0x14039310d\npop     rdi                                                            ; +0x250, 0x140393110\nretn                                                                   ; +0x251, 0x140393111", "xrefs": ["GJPathsLayer::init @ 0x140392cf5", "<???> @ 0x14092306c", "<???> @ 0x140923078"], "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"}