{"type": "func", "start": 5371367968, "end": 5371368448, "name": "GJPathSprite::updateState", "pseudocode": "// \n// GJPathSprite::updateState from 0x140289220 to 0x140289400 (480 bytes)\n// \n// 3 xrefs:\n// > GJPathsLayer::init @ 0x140285022\n// > GJPathPage::init @ 0x140285dec\n// > <???> @ 0x1406d1610\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=3\nvoid GJPathSprite::updateState(GJPathSprite *a1)\n{\n  int m_pathNumber; // ebx\n  GameStatsManager *v3; // rdi\n  const char *v4; // rax\n  int Stat; // ebx\n  signed int v6; // edx\n  const char *v7; // rax\n  struct cocos2d::CCLabelBMFont *v8; // rdi\n  float v9; // xmm0_4\n  struct cocos2d::CCPoint v10; // rax\n  void *v11; // [rsp+20h] [rbp-48h] BYREF\n  struct cocos2d::CCPoint v12; // [rsp+30h] [rbp-38h] BYREF\n  _QWORD v13[4]; // [rsp+38h] [rbp-30h] BYREF\n\n  if ( !qword_1406C2EE8 )\n  {\n    v11 = operator new(0x3E0u);\n    qword_1406C2EE8 = sub_1401D0AE0((__int64)v11);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n  }\n  if ( GameStatsManager::isItemUnlocked((GameStatsManager *)a1, GJItem, a1->m_pathNumber + 5) )\n  {\n    m_pathNumber = a1->m_pathNumber;\n    v3 = (GameStatsManager *)qword_1406C2EE8;\n    if ( !qword_1406C2EE8 )\n    {\n      v11 = operator new(0x3E0u);\n      qword_1406C2EE8 = sub_1401D0AE0((__int64)v11);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n      v3 = (GameStatsManager *)qword_1406C2EE8;\n    }\n    v4 = (const char *)GameToolbox::intToString(v13, m_pathNumber + 29);\n    if ( *((_QWORD *)v4 + 3) > 0xFu )\n      v4 = *(const char **)v4;\n    Stat = GameStatsManager::getStat(v3, v4);\n    sub_14003A830((__int64)v13);\n    v6 = (int)floorf((float)Stat / 100.0);\n    if ( v6 < 10 )\n    {\n      v7 = (const char *)GameToolbox::intToString(v13, v6);\n      if ( *((_QWORD *)v7 + 3) > 0xFu )\n        v7 = *(const char **)v7;\n      v8 = cocos2d::CCLabelBMFont::create(v7, (const char *)&qword_14052A4D8);\n      sub_14003A830((__int64)v13);\n      ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v8->setScale_0)(v8);\n      v9 = ((float (__fastcall *)(GJPathSprite *, struct cocos2d::CCLabelBMFont *, __int64))a1->addChild_0)(a1, v8, 1);\n      cocos2d::CCPoint::CCPoint(v9, 0.0);\n      v10 = cocos2d::CCNode::convertToNodeSpace(a1, &v12);\n      ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator+)(v10, &v11);\n      v8->setPosition_0(v8, (const cocos2d::CCPoint *)&v11);\n    }\n    else\n    {\n      GJPathSprite::addShardSprite(a1);\n    }\n  }\n  else\n  {\n    GJPathSprite::changeToLockedArt(a1);\n  }\n}", "assembly": "; \n; GJPathSprite::updateState from 0x140289220 to 0x140289400 (480 bytes)\n; \n; 3 xrefs:\n; > GJPathsLayer::init @ 0x140285022\n; > GJPathPage::init @ 0x140285dec\n; > <???> @ 0x1406d1610\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_8], rbx                                               ; +0x0, 0x140289220\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140289225\npush    rdi                                                            ; +0xa, 0x14028922a\nsub     rsp, 60h                                                       ; +0xb, 0x14028922b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x14028922f\nxor     rax, rsp                                                       ; +0x16, 0x140289236\nmov     [rsp+68h+var_10], rax                                          ; +0x19, 0x140289239\nmov     rsi, rcx                                                       ; +0x1e, 0x14028923e\ncmp     cs:qword_1406C2EE8, 0                                          ; +0x21, 0x140289241\njnz     short loc_140289273                                            ; +0x29, 0x140289249\nmov     ecx, 3E0h; Size                                                ; +0x2b, 0x14028924b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x30, 0x140289250\nmov     [rsp+68h+var_48], rax                                          ; +0x35, 0x140289255\nmov     rcx, rax                                                       ; +0x3a, 0x14028925a\ncall    sub_1401D0AE0                                                  ; +0x3d, 0x14028925d\nnop                                                                    ; +0x42, 0x140289262\nmov     cs:qword_1406C2EE8, rax                                        ; +0x43, 0x140289263\nmov     rdx, [rax]                                                     ; +0x4a, 0x14028926a\nmov     rcx, rax                                                       ; +0x4d, 0x14028926d\ncall    qword ptr [rdx+48h]                                            ; +0x50, 0x140289270\nmov     r8d, [rsi+258h]                                                ; +0x53, 0x140289273\nadd     r8d, 5                                                         ; +0x5a, 0x14028927a\nmov     edx, 0Ch                                                       ; +0x5e, 0x14028927e\ncall    GameStatsManager__isItemUnlocked                               ; +0x63, 0x140289283\ntest    al, al                                                         ; +0x68, 0x140289288\njnz     short loc_140289299                                            ; +0x6a, 0x14028928a\nmov     rcx, rsi                                                       ; +0x6c, 0x14028928c\ncall    GJPathSprite__changeToLockedArt                                ; +0x6f, 0x14028928f\njmp     loc_1402893E0                                                  ; +0x74, 0x140289294\nmov     ebx, [rsi+258h]                                                ; +0x79, 0x140289299\nmov     rdi, cs:qword_1406C2EE8                                        ; +0x7f, 0x14028929f\ntest    rdi, rdi                                                       ; +0x86, 0x1402892a6\njnz     short loc_1402892DB                                            ; +0x89, 0x1402892a9\nmov     ecx, 3E0h; Size                                                ; +0x8b, 0x1402892ab\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x90, 0x1402892b0\nmov     [rsp+68h+var_48], rax                                          ; +0x95, 0x1402892b5\nmov     rcx, rax                                                       ; +0x9a, 0x1402892ba\ncall    sub_1401D0AE0                                                  ; +0x9d, 0x1402892bd\nnop                                                                    ; +0xa2, 0x1402892c2\nmov     cs:qword_1406C2EE8, rax                                        ; +0xa3, 0x1402892c3\nmov     r8, [rax]                                                      ; +0xaa, 0x1402892ca\nmov     rcx, rax                                                       ; +0xad, 0x1402892cd\ncall    qword ptr [r8+48h]                                             ; +0xb0, 0x1402892d0\nmov     rdi, cs:qword_1406C2EE8                                        ; +0xb4, 0x1402892d4\nlea     edx, [rbx+1Dh]                                                 ; +0xbb, 0x1402892db\nlea     rcx, [rsp+68h+var_30]                                          ; +0xbe, 0x1402892de\ncall    GameToolbox__intToString                                       ; +0xc3, 0x1402892e3\nnop                                                                    ; +0xc8, 0x1402892e8\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xc9, 0x1402892e9\njbe     short loc_1402892F3                                            ; +0xce, 0x1402892ee\nmov     rax, [rax]                                                     ; +0xd0, 0x1402892f0\nmov     rdx, rax                                                       ; +0xd3, 0x1402892f3\nmov     rcx, rdi                                                       ; +0xd6, 0x1402892f6\ncall    GameStatsManager__getStat                                      ; +0xd9, 0x1402892f9\nmov     ebx, eax                                                       ; +0xde, 0x1402892fe\nlea     rcx, [rsp+68h+var_30]                                          ; +0xe0, 0x140289300\ncall    sub_14003A830                                                  ; +0xe5, 0x140289305\nmovd    xmm0, ebx                                                      ; +0xea, 0x14028930a\ncvtdq2ps xmm0, xmm0                                                    ; +0xee, 0x14028930e\ndivss   xmm0, cs:dword_1406232BC; X                                    ; +0xf1, 0x140289311\ncall    floorf                                                         ; +0xf9, 0x140289319\ncvttss2si edx, xmm0                                                    ; +0xfe, 0x14028931e\ncmp     edx, 0Ah                                                       ; +0x102, 0x140289322\njl      short loc_140289334                                            ; +0x105, 0x140289325\nmov     rcx, rsi                                                       ; +0x107, 0x140289327\ncall    GJPathSprite__addShardSprite                                   ; +0x10a, 0x14028932a\njmp     loc_1402893E0                                                  ; +0x10f, 0x14028932f\nlea     rcx, [rsp+68h+var_30]                                          ; +0x114, 0x140289334\ncall    GameToolbox__intToString                                       ; +0x119, 0x140289339\nnop                                                                    ; +0x11e, 0x14028933e\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x11f, 0x14028933f\njbe     short loc_140289349                                            ; +0x124, 0x140289344\nmov     rax, [rax]                                                     ; +0x126, 0x140289346\nlea     rdx, qword_14052A4D8                                           ; +0x129, 0x140289349\nmov     rcx, rax                                                       ; +0x130, 0x140289350\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x133, 0x140289353\nmov     rdi, rax                                                       ; +0x139, 0x140289359\nlea     rcx, [rsp+68h+var_30]                                          ; +0x13c, 0x14028935c\ncall    sub_14003A830                                                  ; +0x141, 0x140289361\nmov     rdx, [rdi]                                                     ; +0x146, 0x140289366\nmovss   xmm1, cs:dword_140622B24                                       ; +0x149, 0x140289369\nmov     rcx, rdi                                                       ; +0x151, 0x140289371\ncall    qword ptr [rdx+0A0h]                                           ; +0x154, 0x140289374\nmov     r9, [rsi]                                                      ; +0x15a, 0x14028937a\nmov     r8d, 1                                                         ; +0x15d, 0x14028937d\nmov     rdx, rdi                                                       ; +0x163, 0x140289383\nmov     rcx, rsi                                                       ; +0x166, 0x140289386\ncall    qword ptr [r9+1B8h]                                            ; +0x169, 0x140289389\nmovss   xmm2, cs:flt_140622C24                                         ; +0x170, 0x140289390\nxorps   xmm1, xmm1                                                     ; +0x178, 0x140289398\nlea     rcx, [rsp+68h+var_40]                                          ; +0x17b, 0x14028939b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x180, 0x1402893a0\nmov     rbx, rax                                                       ; +0x186, 0x1402893a6\nlea     r8, stru_1406C1EC8                                             ; +0x189, 0x1402893a9\nlea     rdx, [rsp+68h+var_38]                                          ; +0x190, 0x1402893b0\nmov     rcx, rsi                                                       ; +0x195, 0x1402893b5\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x198, 0x1402893b8\nmov     r8, rbx                                                        ; +0x19e, 0x1402893be\nlea     rdx, [rsp+68h+var_48]                                          ; +0x1a1, 0x1402893c1\nmov     rcx, rax                                                       ; +0x1a6, 0x1402893c6\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x1a9, 0x1402893c9\nmov     rax, [rdi]                                                     ; +0x1af, 0x1402893cf\nlea     rdx, [rsp+68h+var_48]                                          ; +0x1b2, 0x1402893d2\nmov     rcx, rdi                                                       ; +0x1b7, 0x1402893d7\ncall    qword ptr [rax+0B8h]                                           ; +0x1ba, 0x1402893da\nmov     rcx, [rsp+68h+var_10]                                          ; +0x1c0, 0x1402893e0\nxor     rcx, rsp; StackCookie                                          ; +0x1c5, 0x1402893e5\ncall    __security_check_cookie                                        ; +0x1c8, 0x1402893e8\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x1cd, 0x1402893ed\nmov     rsi, [rsp+68h+arg_10]                                          ; +0x1d2, 0x1402893f2\nadd     rsp, 60h                                                       ; +0x1da, 0x1402893fa\npop     rdi                                                            ; +0x1de, 0x1402893fe\nretn                                                                   ; +0x1df, 0x1402893ff", "xrefs": ["GJPathsLayer::init @ 0x140285022", "GJPathPage::init @ 0x140285dec", "<???> @ 0x1406d1610"], "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"}