{"type": "func", "start": 4298037840, "end": 4298038100, "name": "GJPathSprite::init", "pseudocode": "// \n// GJPathSprite::init from 0x1002eda50 to 0x1002edb54 (260 bytes)\n// \n// 5 xrefs:\n// > GJPathsLayer::init @ 0x1002e93d6\n// > GJPathSprite::create @ 0x1002e94db\n// > GJPathPage::init @ 0x1002ea4c6\n// > GJPathPage::playUnlockAnimation @ 0x1002ebcba\n// > GJPathPage::unlockAnimationStep3 @ 0x1002ecdf7\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 12:28:24 +0000\n// \n\n__int64 __fastcall GJPathSprite::init(__int64 a1, int a2, double a3)\n{\n  int v3; // ebx\n  __int64 v4; // r14\n  __int64 v5; // rax\n  const char *CString; // r12\n  size_t v7; // rax\n  size_t v8; // r15\n  char *v9; // r13\n  char *v10; // rsi\n  size_t v11; // rbx\n  __int64 result; // rax\n  unsigned int v13; // ebx\n  char v14; // [rsp+0h] [rbp-50h]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  v3 = a2;\n  v4 = a1;\n  v5 = sub_10088E820(\"pathIcon_%02d_001.png\", v14);\n  CString = (const char *)cocos2d::CCString::getCString(v5);\n  v7 = strlen(CString);\n  if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v8 = v7;\n  if ( v7 >= 0x17 )\n  {\n    v11 = 26;\n    if ( (v7 | 7) != 0x17 )\n      v11 = (v7 | 7) + 1;\n    v9 = (char *)operator new(v11);\n    __p = v9;\n    __dst[0] = v11 + 1;\n    v3 = a2;\n    v4 = a1;\n    __dst[1] = v8;\nLABEL_9:\n    memmove(v9, CString, v8);\n    v9[v8] = 0;\n    if ( (__dst[0] & 1) != 0 )\n      goto LABEL_5;\n    goto LABEL_10;\n  }\n  LOBYTE(__dst[0]) = 2 * v7;\n  v9 = (char *)__dst + 1;\n  if ( v7 )\n    goto LABEL_9;\n  BYTE1(__dst[0]) = 0;\n  if ( (__dst[0] & 1) != 0 )\n  {\nLABEL_5:\n    v10 = (char *)__p;\n    goto LABEL_11;\n  }\nLABEL_10:\n  v10 = (char *)__dst + 1;\nLABEL_11:\n  result = cocos2d::CCSprite::initWithSpriteFrameName(v4, (__int64)v10, a3);\n  if ( (_BYTE)result )\n    *(_DWORD *)(v4 + 596) = v3;\n  if ( (__dst[0] & 1) != 0 )\n  {\n    v13 = result;\n    operator delete(__p);\n    return v13;\n  }\n  return result;\n}", "assembly": "; \n; GJPathSprite::init from 0x1002eda50 to 0x1002edb54 (260 bytes)\n; \n; 5 xrefs:\n; > GJPathsLayer::init @ 0x1002e93d6\n; > GJPathSprite::create @ 0x1002e94db\n; > GJPathPage::init @ 0x1002ea4c6\n; > GJPathPage::playUnlockAnimation @ 0x1002ebcba\n; > GJPathPage::unlockAnimationStep3 @ 0x1002ecdf7\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 12:28:24 +0000\n; \npush    rbp                                                            ; +0x0, 0x1002eda50\nmov     rbp, rsp                                                       ; +0x1, 0x1002eda51\npush    r15                                                            ; +0x4, 0x1002eda54\npush    r14                                                            ; +0x6, 0x1002eda56\npush    r13                                                            ; +0x8, 0x1002eda58\npush    r12                                                            ; +0xa, 0x1002eda5a\npush    rbx                                                            ; +0xc, 0x1002eda5c\nsub     rsp, 28h                                                       ; +0xd, 0x1002eda5d\nmov     ebx, esi                                                       ; +0x11, 0x1002eda61\nmov     r14, rdi                                                       ; +0x13, 0x1002eda63\nlea     rdi, aPathicon02d001; \"pathIcon_%02d_001.png\"                  ; +0x16, 0x1002eda66\nxor     eax, eax                                                       ; +0x1d, 0x1002eda6d\ncall    sub_10088E820                                                  ; +0x1f, 0x1002eda6f\nmov     rdi, rax                                                       ; +0x24, 0x1002eda74\ncall    cocos2d__CCString__getCString                                  ; +0x27, 0x1002eda77\nmov     r12, rax                                                       ; +0x2c, 0x1002eda7c\nmov     rdi, rax; __s                                                  ; +0x2f, 0x1002eda7f\ncall    _strlen                                                        ; +0x32, 0x1002eda82\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x37, 0x1002eda87\njnb     loc_1002EDB4F                                                  ; +0x3b, 0x1002eda8b\nmov     r15, rax                                                       ; +0x41, 0x1002eda91\ncmp     rax, 17h                                                       ; +0x44, 0x1002eda94\njnb     short loc_1002EDABC                                            ; +0x48, 0x1002eda98\nlea     eax, [r15+r15]                                                 ; +0x4a, 0x1002eda9a\nmov     byte ptr [rbp+__dst], al                                       ; +0x4e, 0x1002eda9e\nlea     r13, [rbp+__dst+1]                                             ; +0x51, 0x1002edaa1\ntest    r15, r15                                                       ; +0x55, 0x1002edaa5\njnz     short loc_1002EDAFC                                            ; +0x58, 0x1002edaa8\nmov     byte ptr [r13+r15+0], 0                                        ; +0x5a, 0x1002edaaa\ntest    byte ptr [rbp+__dst], 1                                        ; +0x60, 0x1002edab0\njz      short loc_1002EDB16                                            ; +0x64, 0x1002edab4\nmov     rsi, [rbp+__p]                                                 ; +0x66, 0x1002edab6\njmp     short loc_1002EDB1A                                            ; +0x6a, 0x1002edaba\nmov     rax, r15                                                       ; +0x6c, 0x1002edabc\nor      rax, 7                                                         ; +0x6f, 0x1002edabf\nlea     rcx, [rax+1]                                                   ; +0x73, 0x1002edac3\ncmp     rax, 17h                                                       ; +0x77, 0x1002edac7\nmov     [rbp+var_48], r14                                              ; +0x7b, 0x1002edacb\nmov     r14d, ebx                                                      ; +0x7f, 0x1002edacf\nmov     ebx, 1Ah                                                       ; +0x82, 0x1002edad2\ncmovnz  rbx, rcx                                                       ; +0x87, 0x1002edad7\nmov     rdi, rbx; __sz                                                 ; +0x8b, 0x1002edadb\ncall    __Znwm; operator new(ulong)                                    ; +0x8e, 0x1002edade\nmov     r13, rax                                                       ; +0x93, 0x1002edae3\nmov     [rbp+__p], rax                                                 ; +0x96, 0x1002edae6\ninc     rbx                                                            ; +0x9a, 0x1002edaea\nmov     [rbp+__dst], rbx                                               ; +0x9d, 0x1002edaed\nmov     ebx, r14d                                                      ; +0xa1, 0x1002edaf1\nmov     r14, [rbp+var_48]                                              ; +0xa4, 0x1002edaf4\nmov     [rbp+var_38], r15                                              ; +0xa8, 0x1002edaf8\nmov     rdi, r13; __dst                                                ; +0xac, 0x1002edafc\nmov     rsi, r12; __src                                                ; +0xaf, 0x1002edaff\nmov     rdx, r15; __len                                                ; +0xb2, 0x1002edb02\ncall    _memmove                                                       ; +0xb5, 0x1002edb05\nmov     byte ptr [r13+r15+0], 0                                        ; +0xba, 0x1002edb0a\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc0, 0x1002edb10\njnz     short loc_1002EDAB6                                            ; +0xc4, 0x1002edb14\nlea     rsi, [rbp+__dst+1]                                             ; +0xc6, 0x1002edb16\nmov     rdi, r14                                                       ; +0xca, 0x1002edb1a\ncall    cocos2d__CCSprite__initWithSpriteFrameName                     ; +0xcd, 0x1002edb1d\ntest    al, al                                                         ; +0xd2, 0x1002edb22\njz      short loc_1002EDB2D                                            ; +0xd4, 0x1002edb24\nmov     [r14+254h], ebx                                                ; +0xd6, 0x1002edb26\ntest    byte ptr [rbp+__dst], 1                                        ; +0xdd, 0x1002edb2d\njz      short loc_1002EDB40                                            ; +0xe1, 0x1002edb31\nmov     rdi, [rbp+__p]; __p                                            ; +0xe3, 0x1002edb33\nmov     ebx, eax                                                       ; +0xe7, 0x1002edb37\ncall    __ZdlPv; operator delete(void *)                               ; +0xe9, 0x1002edb39\nmov     eax, ebx                                                       ; +0xee, 0x1002edb3e\nadd     rsp, 28h                                                       ; +0xf0, 0x1002edb40\npop     rbx                                                            ; +0xf4, 0x1002edb44\npop     r12                                                            ; +0xf5, 0x1002edb45\npop     r13                                                            ; +0xf7, 0x1002edb47\npop     r14                                                            ; +0xf9, 0x1002edb49\npop     r15                                                            ; +0xfb, 0x1002edb4b\npop     rbp                                                            ; +0xfd, 0x1002edb4d\nretn                                                                   ; +0xfe, 0x1002edb4e\ncall    sub_100003630                                                  ; +0xff, 0x1002edb4f", "xrefs": ["GJPathsLayer::init @ 0x1002e93d6", "GJPathSprite::create @ 0x1002e94db", "GJPathPage::init @ 0x1002ea4c6", "GJPathPage::playUnlockAnimation @ 0x1002ebcba", "GJPathPage::unlockAnimationStep3 @ 0x1002ecdf7"], "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"}