{"type": "func", "start": 5372555024, "end": 5372555251, "name": "GJDifficultySprite::create", "pseudocode": "// \n// GJDifficultySprite::create from 0x1403aaf10 to 0x1403aaff3 (227 bytes)\n// \n// 8 xrefs:\n// > SongUsagePopup::buildUsageGrid @ 0x1401031b7\n// > LevelCell::loadCustomLevelCell @ 0x14014af4b\n// > GJRateLevelLayer::init @ 0x140419bb6\n// > LevelInfoLayer::setupLevelInfo @ 0x140420489\n// > StarInfoPopup::init @ 0x14055c3fe\n// > RateStarsLayer::init @ 0x14055e9e8\n// > RateStarsModLayer::init @ 0x14055fa6e\n// > <???> @ 0x140923a14\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:20 +0000\n// \n\n// Hidden C++ exception states: #wind=2\ncocos2d::CCSprite *GJDifficultySprite::create()\n{\n  cocos2d::CCSprite *v0; // rsi\n  __int64 DifficultyFrame; // rax\n  bool v2; // bl\n  _BYTE Src[32]; // [rsp+28h] [rbp-30h] BYREF\n\n  v0 = (cocos2d::CCSprite *)operator new(0x260u);\n  cocos2d::CCSprite::CCSprite(v0);\n  *(_QWORD *)v0 = &GJDifficultySprite::`vftable';\n  *((_QWORD *)v0 + 40) = &GJDifficultySprite::`vftable';\n  *((_QWORD *)v0 + 43) = &GJDifficultySprite::`vftable';\n  *((_DWORD *)v0 + 150) = 0;\n  DifficultyFrame = GJDifficultySprite::getDifficultyFrame(Src);\n  if ( *(_QWORD *)(DifficultyFrame + 24) > 0xFu )\n    DifficultyFrame = *(_QWORD *)DifficultyFrame;\n  v2 = cocos2d::CCSprite::initWithSpriteFrameName(v0, (const char *)DifficultyFrame);\n  sub_14003D310((__int64)Src);\n  if ( v2 )\n  {\n    cocos2d::CCObject::autorelease(v0);\n    return v0;\n  }\n  else\n  {\n    (*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(*(_QWORD *)v0 + 8LL))(v0, 1);\n    return nullptr;\n  }\n}", "assembly": "; \n; GJDifficultySprite::create from 0x1403aaf10 to 0x1403aaff3 (227 bytes)\n; \n; 8 xrefs:\n; > SongUsagePopup::buildUsageGrid @ 0x1401031b7\n; > LevelCell::loadCustomLevelCell @ 0x14014af4b\n; > GJRateLevelLayer::init @ 0x140419bb6\n; > LevelInfoLayer::setupLevelInfo @ 0x140420489\n; > StarInfoPopup::init @ 0x14055c3fe\n; > RateStarsLayer::init @ 0x14055e9e8\n; > RateStarsModLayer::init @ 0x14055fa6e\n; > <???> @ 0x140923a14\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:20 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1403aaf10\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1403aaf15\npush    rdi                                                            ; +0xa, 0x1403aaf1a\nsub     rsp, 50h                                                       ; +0xb, 0x1403aaf1b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1403aaf1f\nxor     rax, rsp                                                       ; +0x16, 0x1403aaf26\nmov     [rsp+58h+var_10], rax                                          ; +0x19, 0x1403aaf29\nmov     edi, edx                                                       ; +0x1e, 0x1403aaf2e\nmov     ebx, ecx                                                       ; +0x20, 0x1403aaf30\nmov     ecx, 260h; Size                                                ; +0x22, 0x1403aaf32\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x27, 0x1403aaf37\nmov     rsi, rax                                                       ; +0x2c, 0x1403aaf3c\nmov     [rsp+58h+var_38], rax                                          ; +0x2f, 0x1403aaf3f\nmov     rcx, rax                                                       ; +0x34, 0x1403aaf44\ncall    cs:??0CCSprite@cocos2d@@QEAA@XZ; cocos2d::CCSprite::CCSprite(void) ; +0x37, 0x1403aaf47\nlea     rax, ??_7GJDifficultySprite@@6B@; const GJDifficultySprite::`vftable' ; +0x3d, 0x1403aaf4d\nmov     [rsi], rax                                                     ; +0x44, 0x1403aaf54\nlea     rax, ??_7GJDifficultySprite@@6B@_0; const GJDifficultySprite::`vftable' ; +0x47, 0x1403aaf57\nmov     [rsi+140h], rax                                                ; +0x4e, 0x1403aaf5e\nlea     rax, ??_7GJDifficultySprite@@6B@_1; const GJDifficultySprite::`vftable' ; +0x55, 0x1403aaf65\nmov     [rsi+158h], rax                                                ; +0x5c, 0x1403aaf6c\nmov     dword ptr [rsi+258h], 0                                        ; +0x63, 0x1403aaf73\nmov     r8d, edi                                                       ; +0x6d, 0x1403aaf7d\nmov     edx, ebx                                                       ; +0x70, 0x1403aaf80\nlea     rcx, [rsp+58h+Src]; Src                                        ; +0x72, 0x1403aaf82\ncall    GJDifficultySprite__getDifficultyFrame                         ; +0x77, 0x1403aaf87\nnop                                                                    ; +0x7c, 0x1403aaf8c\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x7d, 0x1403aaf8d\njbe     short loc_1403AAF97                                            ; +0x82, 0x1403aaf92\nmov     rax, [rax]                                                     ; +0x84, 0x1403aaf94\nmov     rdx, rax                                                       ; +0x87, 0x1403aaf97\nmov     rcx, rsi                                                       ; +0x8a, 0x1403aaf9a\ncall    cs:__imp_?initWithSpriteFrameName@CCSprite@cocos2d@@UEAA_NPEBD@Z; cocos2d::CCSprite::initWithSpriteFrameName(char const *) ; +0x8d, 0x1403aaf9d\nmovzx   ebx, al                                                        ; +0x93, 0x1403aafa3\nlea     rcx, [rsp+58h+Src]                                             ; +0x96, 0x1403aafa6\ncall    sub_14003D310                                                  ; +0x9b, 0x1403aafab\ntest    bl, bl                                                         ; +0xa0, 0x1403aafb0\njz      short loc_1403AAFC2                                            ; +0xa2, 0x1403aafb2\nmov     rcx, rsi                                                       ; +0xa4, 0x1403aafb4\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0xa7, 0x1403aafb7\nmov     rax, rsi                                                       ; +0xad, 0x1403aafbd\njmp     short loc_1403AAFD6                                            ; +0xb0, 0x1403aafc0\nmov     rcx, [rsi]                                                     ; +0xb2, 0x1403aafc2\nmov     r8, [rcx+8]                                                    ; +0xb5, 0x1403aafc5\nmov     edx, 1                                                         ; +0xb9, 0x1403aafc9\nmov     rcx, rsi                                                       ; +0xbe, 0x1403aafce\ncall    r8                                                             ; +0xc1, 0x1403aafd1\nxor     eax, eax                                                       ; +0xc4, 0x1403aafd4\nmov     rcx, [rsp+58h+var_10]                                          ; +0xc6, 0x1403aafd6\nxor     rcx, rsp; StackCookie                                          ; +0xcb, 0x1403aafdb\ncall    __security_check_cookie                                        ; +0xce, 0x1403aafde\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xd3, 0x1403aafe3\nmov     rsi, [rsp+58h+arg_18]                                          ; +0xd8, 0x1403aafe8\nadd     rsp, 50h                                                       ; +0xdd, 0x1403aafed\npop     rdi                                                            ; +0xe1, 0x1403aaff1\nretn                                                                   ; +0xe2, 0x1403aaff2", "xrefs": ["SongUsagePopup::buildUsageGrid @ 0x1401031b7", "LevelCell::loadCustomLevelCell @ 0x14014af4b", "GJRateLevelLayer::init @ 0x140419bb6", "LevelInfoLayer::setupLevelInfo @ 0x140420489", "StarInfoPopup::init @ 0x14055c3fe", "RateStarsLayer::init @ 0x14055e9e8", "RateStarsModLayer::init @ 0x14055fa6e", "<???> @ 0x140923a14"], "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"}