{"type": "func", "start": 5371482000, "end": 5371482221, "name": "GJDifficultySprite::create", "pseudocode": "// \n// GJDifficultySprite::create from 0x1402a4f90 to 0x1402a506d (221 bytes)\n// \n// 6 xrefs:\n// > LevelCell::loadCustomLevelCell @ 0x1400af78f\n// > GJRateLevelLayer::init @ 0x1402f4e1b\n// > LevelInfoLayer::setupLevelInfo @ 0x1402fb56e\n// > StarInfoPopup::init @ 0x1403c8541\n// > RateStarsLayer::init @ 0x1403ca60a\n// > <???> @ 0x1406d2060\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\nGJDifficultySprite *GJDifficultySprite::create(int a1, GJDifficultyName a2)\n{\n  GJDifficultySprite *v2; // rsi\n  __int64 DifficultyFrame; // rax\n  bool v4; // bl\n  _BYTE Src[32]; // [rsp+28h] [rbp-30h] BYREF\n\n  v2 = (GJDifficultySprite *)operator new(0x260u);\n  cocos2d::CCSprite::CCSprite(v2);\n  v2->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJDifficultySprite_vtbl *)&GJDifficultySprite::`vftable';\n  v2->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&GJDifficultySprite::`vftable';\n  v2->cocos2d::CCSprite::cocos2d::CCTextureProtocol::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCTextureProtocol_vtbl *)&GJDifficultySprite::`vftable';\n  v2->m_featureState = 0;\n  DifficultyFrame = GJDifficultySprite::getDifficultyFrame(Src);\n  if ( *(_QWORD *)(DifficultyFrame + 24) > 0xFu )\n    DifficultyFrame = *(_QWORD *)DifficultyFrame;\n  v4 = cocos2d::CCSprite::initWithSpriteFrameName(v2, (const char *)DifficultyFrame);\n  sub_14003A830((__int64)Src);\n  if ( v4 )\n  {\n    cocos2d::CCObject::autorelease(v2);\n    return v2;\n  }\n  else\n  {\n    ((void (__fastcall *)(GJDifficultySprite *, __int64))v2->~GJDifficultySprite)(v2, 1);\n    return nullptr;\n  }\n}", "assembly": "; \n; GJDifficultySprite::create from 0x1402a4f90 to 0x1402a506d (221 bytes)\n; \n; 6 xrefs:\n; > LevelCell::loadCustomLevelCell @ 0x1400af78f\n; > GJRateLevelLayer::init @ 0x1402f4e1b\n; > LevelInfoLayer::setupLevelInfo @ 0x1402fb56e\n; > StarInfoPopup::init @ 0x1403c8541\n; > RateStarsLayer::init @ 0x1403ca60a\n; > <???> @ 0x1406d2060\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, 0x1402a4f90\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1402a4f95\npush    rdi                                                            ; +0xa, 0x1402a4f9a\nsub     rsp, 50h                                                       ; +0xb, 0x1402a4f9b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1402a4f9f\nxor     rax, rsp                                                       ; +0x16, 0x1402a4fa6\nmov     [rsp+58h+var_10], rax                                          ; +0x19, 0x1402a4fa9\nmov     edi, edx                                                       ; +0x1e, 0x1402a4fae\nmov     ebx, ecx                                                       ; +0x20, 0x1402a4fb0\nmov     ecx, 260h; Size                                                ; +0x22, 0x1402a4fb2\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x27, 0x1402a4fb7\nmov     rsi, rax                                                       ; +0x2c, 0x1402a4fbc\nmov     [rsp+58h+var_38], rax                                          ; +0x2f, 0x1402a4fbf\nmov     rcx, rax                                                       ; +0x34, 0x1402a4fc4\ncall    cs:??0CCSprite@cocos2d@@QEAA@XZ; cocos2d::CCSprite::CCSprite(void) ; +0x37, 0x1402a4fc7\nlea     rax, ??_7GJDifficultySprite@@6B@; const GJDifficultySprite::`vftable' ; +0x3d, 0x1402a4fcd\nmov     [rsi], rax                                                     ; +0x44, 0x1402a4fd4\nlea     rax, ??_7GJDifficultySprite@@6B@_0; const GJDifficultySprite::`vftable' ; +0x47, 0x1402a4fd7\nmov     [rsi+140h], rax                                                ; +0x4e, 0x1402a4fde\nlea     rax, ??_7GJDifficultySprite@@6B@_1; const GJDifficultySprite::`vftable' ; +0x55, 0x1402a4fe5\nmov     [rsi+158h], rax                                                ; +0x5c, 0x1402a4fec\nmov     dword ptr [rsi+258h], 0                                        ; +0x63, 0x1402a4ff3\nmov     r8d, edi                                                       ; +0x6d, 0x1402a4ffd\nmov     edx, ebx                                                       ; +0x70, 0x1402a5000\nlea     rcx, [rsp+58h+Src]; Src                                        ; +0x72, 0x1402a5002\ncall    GJDifficultySprite__getDifficultyFrame                         ; +0x77, 0x1402a5007\nnop                                                                    ; +0x7c, 0x1402a500c\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x7d, 0x1402a500d\njbe     short loc_1402A5017                                            ; +0x82, 0x1402a5012\nmov     rax, [rax]                                                     ; +0x84, 0x1402a5014\nmov     rdx, rax                                                       ; +0x87, 0x1402a5017\nmov     rcx, rsi                                                       ; +0x8a, 0x1402a501a\ncall    cs:__imp_?initWithSpriteFrameName@CCSprite@cocos2d@@UEAA_NPEBD@Z; cocos2d::CCSprite::initWithSpriteFrameName(char const *) ; +0x8d, 0x1402a501d\nmovzx   ebx, al                                                        ; +0x93, 0x1402a5023\nlea     rcx, [rsp+58h+Src]                                             ; +0x96, 0x1402a5026\ncall    sub_14003A830                                                  ; +0x9b, 0x1402a502b\nmov     rcx, rsi                                                       ; +0xa0, 0x1402a5030\ntest    bl, bl                                                         ; +0xa3, 0x1402a5033\njz      short loc_1402A5042                                            ; +0xa5, 0x1402a5035\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0xa7, 0x1402a5037\nmov     rax, rsi                                                       ; +0xad, 0x1402a503d\njmp     short loc_1402A5050                                            ; +0xb0, 0x1402a5040\nmov     r8, [rsi]                                                      ; +0xb2, 0x1402a5042\nmov     edx, 1                                                         ; +0xb5, 0x1402a5045\ncall    qword ptr [r8+8]                                               ; +0xba, 0x1402a504a\nxor     eax, eax                                                       ; +0xbe, 0x1402a504e\nmov     rcx, [rsp+58h+var_10]                                          ; +0xc0, 0x1402a5050\nxor     rcx, rsp; StackCookie                                          ; +0xc5, 0x1402a5055\ncall    __security_check_cookie                                        ; +0xc8, 0x1402a5058\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xcd, 0x1402a505d\nmov     rsi, [rsp+58h+arg_18]                                          ; +0xd2, 0x1402a5062\nadd     rsp, 50h                                                       ; +0xd7, 0x1402a5067\npop     rdi                                                            ; +0xdb, 0x1402a506b\nretn                                                                   ; +0xdc, 0x1402a506c", "xrefs": ["LevelCell::loadCustomLevelCell @ 0x1400af78f", "GJRateLevelLayer::init @ 0x1402f4e1b", "LevelInfoLayer::setupLevelInfo @ 0x1402fb56e", "StarInfoPopup::init @ 0x1403c8541", "RateStarsLayer::init @ 0x1403ca60a", "<???> @ 0x1406d2060"], "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"}