{"type": "func", "start": 4930380, "end": 4930494, "name": "GJDifficultySprite::getDifficultyFrame", "pseudocode": "// \n// GJDifficultySprite::getDifficultyFrame from 0x4b3b4c to 0x4b3bbe (114 bytes)\n// \n// 2 xrefs:\n// > GJDifficultySprite::init @ 0x4b3be6\n// > GJDifficultySprite::updateDifficultyFrame @ 0x4b3cb2\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\nint __fastcall GJDifficultySprite::getDifficultyFrame(int a1, const char *a2, int a3)\n{\n  cocos2d::CCString *v6; // r0\n  char *CString; // r0\n\n  v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"difficulty_%02d_\", a2);\n  CString = (char *)cocos2d::CCString::getCString(v6);\n  sub_776584(a1, CString);\n  if ( a3 == 1 && (unsigned int)(a2 - 6) <= 4 )\n  {\n    sub_774544(a1, \"btn2_001.png\");\n  }\n  else\n  {\n    sub_774544(a1, \"btn_001.png\");\n    if ( a2 == (const char *)-1 )\n      sub_7753D4(a1, \"difficulty_auto_btn_001.png\");\n  }\n  return a1;\n}", "assembly": "; \n; GJDifficultySprite::getDifficultyFrame from 0x4b3b4c to 0x4b3bbe (114 bytes)\n; \n; 2 xrefs:\n; > GJDifficultySprite::init @ 0x4b3be6\n; > GJDifficultySprite::updateDifficultyFrame @ 0x4b3cb2\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\nPUSH            {R0-R2,R4-R7,LR}                                       ; +0x0, 0x4b3b4c\nMOV             R5, R0                                                 ; +0x2, 0x4b3b4e\nLDR             R4, =(__stack_chk_guard_ptr - 0x4B3B5C)                ; +0x4, 0x4b3b50\nMOV             R7, R2                                                 ; +0x6, 0x4b3b52\nLDR             R0, =(aDifficulty02d - 0x4B3B60); \"difficulty_%02d_\"   ; +0x8, 0x4b3b54\nMOV             R6, R1                                                 ; +0xa, 0x4b3b56\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xc, 0x4b3b58\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xe, 0x4b3b5a\nADD             R0, PC; \"difficulty_%02d_\"                             ; +0x10, 0x4b3b5c\nLDR             R3, [R4]                                               ; +0x12, 0x4b3b5e\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x14, 0x4b3b60\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x16, 0x4b3b62\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x1a, 0x4b3b66\nMOV             R2, SP                                                 ; +0x1e, 0x4b3b6a\nMOV             R1, R0; char *                                         ; +0x20, 0x4b3b6c\nMOV             R0, R5; int                                            ; +0x22, 0x4b3b6e\nBL              sub_776584                                             ; +0x24, 0x4b3b70\nCMP             R7, #1                                                 ; +0x28, 0x4b3b74\nMOV             R0, R5; int                                            ; +0x2a, 0x4b3b76\nBNE             loc_4B3B8A                                             ; +0x2c, 0x4b3b78\nSUBS            R3, R6, #6                                             ; +0x2e, 0x4b3b7a\nCMP             R3, #4                                                 ; +0x30, 0x4b3b7c\nBHI             loc_4B3B8A                                             ; +0x32, 0x4b3b7e\nLDR             R1, =(aBtn2001Png - 0x4B3B86); \"btn2_001.png\"          ; +0x34, 0x4b3b80\nADD             R1, PC; \"btn2_001.png\"                                 ; +0x36, 0x4b3b82\nBL              sub_774544                                             ; +0x38, 0x4b3b84\nB               loc_4B3BAC                                             ; +0x3c, 0x4b3b88\nLDR             R1, =(aBtn001Png - 0x4B3B90); \"btn_001.png\"            ; +0x3e, 0x4b3b8a\nADD             R1, PC; \"btn_001.png\"                                  ; +0x40, 0x4b3b8c\nBL              sub_774544                                             ; +0x42, 0x4b3b8e\nADDS            R6, #1                                                 ; +0x46, 0x4b3b92\nBNE             loc_4B3BAC                                             ; +0x48, 0x4b3b94\nLDR             R1, =(aDifficultyAuto - 0x4B3B9E); \"difficulty_auto_btn_001.png\" ; +0x4a, 0x4b3b96\nMOV             R0, R5; int                                            ; +0x4c, 0x4b3b98\nADD             R1, PC; \"difficulty_auto_btn_001.png\"                  ; +0x4e, 0x4b3b9a\nBL              sub_7753D4                                             ; +0x50, 0x4b3b9c\nB               loc_4B3BAC                                             ; +0x54, 0x4b3ba0\nMOV             R0, R5                                                 ; +0x56, 0x4b3ba2\nBL              sub_774008                                             ; +0x58, 0x4b3ba4\nBL              __cxa_end_cleanup                                      ; +0x5c, 0x4b3ba8\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x60, 0x4b3bac\nMOV             R0, R5                                                 ; +0x62, 0x4b3bae\nLDR             R3, [R4]                                               ; +0x64, 0x4b3bb0\nCMP             R2, R3                                                 ; +0x66, 0x4b3bb2\nBEQ             loc_4B3BBA                                             ; +0x68, 0x4b3bb4\nBLX             __stack_chk_fail                                       ; +0x6a, 0x4b3bb6\nADD             SP, SP, #0xC                                           ; +0x6e, 0x4b3bba\nPOP             {R4-R7,PC}                                             ; +0x70, 0x4b3bbc", "xrefs": ["GJDifficultySprite::init @ 0x4b3be6", "GJDifficultySprite::updateDifficultyFrame @ 0x4b3cb2"], "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"}