{"type": "func", "start": 5372472944, "end": 5372473363, "name": "GJPathSprite::create", "pseudocode": "// \n// GJPathSprite::create from 0x140396e70 to 0x140397013 (419 bytes)\n// \n// 6 xrefs:\n// > GJItemIcon::init @ 0x140383ad3\n// > GJPathsLayer::init @ 0x140392d27\n// > GJPathPage::init @ 0x140393b19\n// > GJPathPage::playUnlockAnimation @ 0x140395c78\n// > GJPathPage::unlockAnimationStep3 @ 0x140396461\n// > <???> @ 0x140923120\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:13 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid *__fastcall GJPathSprite::create(int a1)\n{\n  void *v2; // rbx\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  void **v6; // rdx\n  void *v7; // rcx\n  void *v8; // rcx\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __int64 v11; // [rsp+48h] [rbp-20h]\n  unsigned __int64 v12; // [rsp+50h] [rbp-18h]\n\n  v2 = operator new(0x260u);\n  memset(v2, 0, 0x260u);\n  cocos2d::CCSprite::CCSprite((cocos2d::CCSprite *)v2);\n  *(_QWORD *)v2 = &GJPathSprite::`vftable';\n  *((_QWORD *)v2 + 40) = &GJPathSprite::`vftable';\n  *((_QWORD *)v2 + 43) = &GJPathSprite::`vftable';\n  v3 = cocos2d::CCString::createWithFormat(\"pathIcon_%02d_001.png\", a1);\n  CString = cocos2d::CCString::getCString(v3);\n  *(_OWORD *)Block = 0;\n  v11 = 0;\n  v12 = 0;\n  v5 = -1;\n  do\n    ++v5;\n  while ( CString[v5] );\n  sub_14003D230(Block, CString, v5);\n  v6 = Block;\n  if ( v12 > 0xF )\n    v6 = (void **)Block[0];\n  if ( cocos2d::CCSprite::initWithSpriteFrameName((cocos2d::CCSprite *)v2, (const char *)v6) )\n  {\n    *((_DWORD *)v2 + 150) = a1;\n    if ( v12 > 0xF )\n    {\n      v8 = Block[0];\n      if ( v12 + 1 >= 0x1000 )\n      {\n        v8 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n          goto LABEL_14;\n      }\n      j_j_free(v8);\n    }\n    cocos2d::CCObject::autorelease((cocos2d::CCObject *)v2);\n    return v2;\n  }\n  if ( v12 > 0xF )\n  {\n    v7 = Block[0];\n    if ( v12 + 1 < 0x1000\n      || (v7 = *((void **)Block[0] - 1), (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) <= 0x1F) )\n    {\n      j_j_free(v7);\n      goto LABEL_10;\n    }\nLABEL_14:\n    invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n  }\nLABEL_10:\n  (*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v2 + 8LL))(v2, 1);\n  return nullptr;\n}", "assembly": "; \n; GJPathSprite::create from 0x140396e70 to 0x140397013 (419 bytes)\n; \n; 6 xrefs:\n; > GJItemIcon::init @ 0x140383ad3\n; > GJPathsLayer::init @ 0x140392d27\n; > GJPathPage::init @ 0x140393b19\n; > GJPathPage::playUnlockAnimation @ 0x140395c78\n; > GJPathPage::unlockAnimationStep3 @ 0x140396461\n; > <???> @ 0x140923120\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:13 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140396e70\npush    rdi                                                            ; +0x5, 0x140396e75\nsub     rsp, 60h                                                       ; +0x6, 0x140396e76\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x140396e7a\nxor     rax, rsp                                                       ; +0x11, 0x140396e81\nmov     [rsp+68h+var_10], rax                                          ; +0x14, 0x140396e84\nmov     edi, ecx                                                       ; +0x19, 0x140396e89\nmov     ecx, 260h; Size                                                ; +0x1b, 0x140396e8b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x20, 0x140396e90\nmov     rbx, rax                                                       ; +0x25, 0x140396e95\nmov     [rsp+68h+var_38], rax                                          ; +0x28, 0x140396e98\nxor     edx, edx; Val                                                  ; +0x2d, 0x140396e9d\nmov     r8d, 260h; Size                                                ; +0x2f, 0x140396e9f\nmov     rcx, rax; void *                                               ; +0x35, 0x140396ea5\ncall    memset                                                         ; +0x38, 0x140396ea8\nmov     rcx, rbx                                                       ; +0x3d, 0x140396ead\ncall    cs:??0CCSprite@cocos2d@@QEAA@XZ; cocos2d::CCSprite::CCSprite(void) ; +0x40, 0x140396eb0\nlea     rax, ??_7GJPathSprite@@6B@; const GJPathSprite::`vftable'      ; +0x46, 0x140396eb6\nmov     [rbx], rax                                                     ; +0x4d, 0x140396ebd\nlea     rax, ??_7GJPathSprite@@6B@_0; const GJPathSprite::`vftable'    ; +0x50, 0x140396ec0\nmov     [rbx+140h], rax                                                ; +0x57, 0x140396ec7\nlea     rax, ??_7GJPathSprite@@6B@_1; const GJPathSprite::`vftable'    ; +0x5e, 0x140396ece\nmov     [rbx+158h], rax                                                ; +0x65, 0x140396ed5\nmov     edx, edi                                                       ; +0x6c, 0x140396edc\nlea     rcx, aPathicon02d001; \"pathIcon_%02d_001.png\"                  ; +0x6e, 0x140396ede\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x75, 0x140396ee5\nmov     rcx, rax                                                       ; +0x7b, 0x140396eeb\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x7e, 0x140396eee\nxorps   xmm0, xmm0                                                     ; +0x84, 0x140396ef4\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x87, 0x140396ef7\nmov     [rsp+68h+var_20], 0                                            ; +0x8c, 0x140396efc\nmov     [rsp+68h+var_18], 0                                            ; +0x95, 0x140396f05\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x9e, 0x140396f0e\ninc     r8                                                             ; +0xa5, 0x140396f15\ncmp     byte ptr [rax+r8], 0                                           ; +0xa8, 0x140396f18\njnz     short loc_140396F15                                            ; +0xad, 0x140396f1d\nmov     rdx, rax                                                       ; +0xaf, 0x140396f1f\nlea     rcx, [rsp+68h+Block]                                           ; +0xb2, 0x140396f22\ncall    sub_14003D230                                                  ; +0xb7, 0x140396f27\nnop                                                                    ; +0xbc, 0x140396f2c\nlea     rdx, [rsp+68h+Block]                                           ; +0xbd, 0x140396f2d\ncmp     [rsp+68h+var_18], 0Fh                                          ; +0xc2, 0x140396f32\ncmova   rdx, [rsp+68h+Block]                                           ; +0xc8, 0x140396f38\nmov     rcx, rbx                                                       ; +0xce, 0x140396f3e\ncall    cs:__imp_?initWithSpriteFrameName@CCSprite@cocos2d@@UEAA_NPEBD@Z; cocos2d::CCSprite::initWithSpriteFrameName(char const *) ; +0xd1, 0x140396f41\ntest    al, al                                                         ; +0xd7, 0x140396f47\njnz     short loc_140396F96                                            ; +0xd9, 0x140396f49\nmov     rdx, [rsp+68h+var_18]                                          ; +0xdb, 0x140396f4b\ncmp     rdx, 0Fh                                                       ; +0xe0, 0x140396f50\njbe     short loc_140396F84                                            ; +0xe4, 0x140396f54\ninc     rdx                                                            ; +0xe6, 0x140396f56\nmov     rcx, [rsp+68h+Block]                                           ; +0xe9, 0x140396f59\nmov     rax, rcx                                                       ; +0xee, 0x140396f5e\ncmp     rdx, 1000h                                                     ; +0xf1, 0x140396f61\njb      short loc_140396F7F                                            ; +0xf8, 0x140396f68\nadd     rdx, 27h ; '''                                                 ; +0xfa, 0x140396f6a\nmov     rcx, [rcx-8]; Block                                            ; +0xfe, 0x140396f6e\nsub     rax, rcx                                                       ; +0x102, 0x140396f72\nsub     rax, 8                                                         ; +0x105, 0x140396f75\ncmp     rax, 1Fh                                                       ; +0x109, 0x140396f79\nja      short loc_140396FD0                                            ; +0x10d, 0x140396f7d\ncall    j_j_free                                                       ; +0x10f, 0x140396f7f\nmov     rax, [rbx]                                                     ; +0x114, 0x140396f84\nmov     edx, 1                                                         ; +0x117, 0x140396f87\nmov     rcx, rbx                                                       ; +0x11c, 0x140396f8c\ncall    qword ptr [rax+8]                                              ; +0x11f, 0x140396f8f\nxor     ebx, ebx                                                       ; +0x122, 0x140396f92\njmp     short loc_140396FF8                                            ; +0x124, 0x140396f94\nmov     [rbx+258h], edi                                                ; +0x126, 0x140396f96\nmov     rdx, [rsp+68h+var_18]                                          ; +0x12c, 0x140396f9c\ncmp     rdx, 0Fh                                                       ; +0x131, 0x140396fa1\njbe     short loc_140396FEF                                            ; +0x135, 0x140396fa5\ninc     rdx                                                            ; +0x137, 0x140396fa7\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x13a, 0x140396faa\nmov     rax, rcx                                                       ; +0x13f, 0x140396faf\ncmp     rdx, 1000h                                                     ; +0x142, 0x140396fb2\njb      short loc_140396FEA                                            ; +0x149, 0x140396fb9\nadd     rdx, 27h ; '''                                                 ; +0x14b, 0x140396fbb\nmov     rcx, [rcx-8]                                                   ; +0x14f, 0x140396fbf\nsub     rax, rcx                                                       ; +0x153, 0x140396fc3\nsub     rax, 8                                                         ; +0x156, 0x140396fc6\ncmp     rax, 1Fh                                                       ; +0x15a, 0x140396fca\njbe     short loc_140396FEA                                            ; +0x15e, 0x140396fce\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x160, 0x140396fd0\nxor     r9d, r9d; LineNo                                               ; +0x169, 0x140396fd9\nxor     r8d, r8d; FileName                                             ; +0x16c, 0x140396fdc\nxor     edx, edx; FunctionName                                         ; +0x16f, 0x140396fdf\nxor     ecx, ecx; Expression                                           ; +0x171, 0x140396fe1\ncall    cs:_invoke_watson                                              ; +0x173, 0x140396fe3\nalign 2                                                                ; +0x179, 0x140396fe9\ncall    j_j_free                                                       ; +0x17a, 0x140396fea\nmov     rcx, rbx                                                       ; +0x17f, 0x140396fef\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x182, 0x140396ff2\nmov     rax, rbx                                                       ; +0x188, 0x140396ff8\nmov     rcx, [rsp+68h+var_10]                                          ; +0x18b, 0x140396ffb\nxor     rcx, rsp; StackCookie                                          ; +0x190, 0x140397000\ncall    __security_check_cookie                                        ; +0x193, 0x140397003\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x198, 0x140397008\nadd     rsp, 60h                                                       ; +0x19d, 0x14039700d\npop     rdi                                                            ; +0x1a1, 0x140397011\nretn                                                                   ; +0x1a2, 0x140397012", "xrefs": ["GJItemIcon::init @ 0x140383ad3", "GJPathsLayer::init @ 0x140392d27", "GJPathPage::init @ 0x140393b19", "GJPathPage::playUnlockAnimation @ 0x140395c78", "GJPathPage::unlockAnimationStep3 @ 0x140396461", "<???> @ 0x140923120"], "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"}