{"type": "func", "start": 5047828, "end": 5047968, "name": "CurrencySprite::spriteTypeToStat", "pseudocode": "// \n// CurrencySprite::spriteTypeToStat from 0x4d0614 to 0x4d06a0 (140 bytes)\n// \n// 2 xrefs:\n// > CurrencyRewardLayer::init @ 0x4d2354\n// > CurrencyRewardLayer::init @ 0x4d237a\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 CurrencySprite::spriteTypeToStat(int a1, int a2)\n{\n  char *v3; // r1\n\n  switch ( a2 )\n  {\n    case 4:\n      v3 = \"18\";\n      break;\n    case 5:\n      v3 = \"19\";\n      break;\n    case 6:\n      v3 = \"17\";\n      break;\n    case 7:\n      v3 = \"16\";\n      break;\n    case 8:\n      v3 = \"20\";\n      break;\n    case 9:\n      v3 = \"21\";\n      break;\n    case 10:\n      v3 = \"23\";\n      break;\n    case 11:\n      v3 = \"24\";\n      break;\n    case 12:\n      v3 = \"25\";\n      break;\n    case 13:\n      v3 = \"26\";\n      break;\n    case 14:\n      v3 = \"27\";\n      break;\n    case 16:\n      v3 = \"43\";\n      break;\n    default:\n      v3 = (char *)&unk_939830;\n      break;\n  }\n  sub_776584(a1, v3);\n  return a1;\n}", "assembly": "; \n; CurrencySprite::spriteTypeToStat from 0x4d0614 to 0x4d06a0 (140 bytes)\n; \n; 2 xrefs:\n; > CurrencyRewardLayer::init @ 0x4d2354\n; > CurrencyRewardLayer::init @ 0x4d237a\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x4D061C)                ; +0x0, 0x4d0614\nPUSH            {R0-R2,R4,R5,LR}                                       ; +0x2, 0x4d0616\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x4d0618\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x4d061a\nSUBS            R1, #4; switch 13 cases                                ; +0x8, 0x4d061c\nMOV             R4, R0                                                 ; +0xa, 0x4d061e\nLDR             R2, [R3]                                               ; +0xc, 0x4d0620\nMOV             R5, R3                                                 ; +0xe, 0x4d0622\nSTR             R2, [SP,#0xC+var_8]                                    ; +0x10, 0x4d0624\nMOV             R2, SP                                                 ; +0x12, 0x4d0626\nCMP             R1, #0xC                                               ; +0x14, 0x4d0628\nBHI             def_4D062C; jumptable 004D062C default case, case 15   ; +0x16, 0x4d062a\nTBB.W           [PC,R1]; switch jump                                   ; +0x18, 0x4d062c\nDCB 7; jump table for switch statement                                 ; +0x1c, 0x4d0630\nDCB 0xA                                                                ; +0x1d, 0x4d0631\nDCB 0xD                                                                ; +0x1e, 0x4d0632\nDCB 0x10                                                               ; +0x1f, 0x4d0633\nDCB 0x13                                                               ; +0x20, 0x4d0634\nDCB 0x16                                                               ; +0x21, 0x4d0635\nDCB 0x19                                                               ; +0x22, 0x4d0636\nDCB 0x1C                                                               ; +0x23, 0x4d0637\nDCB 0x1F                                                               ; +0x24, 0x4d0638\nDCB 0x22                                                               ; +0x25, 0x4d0639\nDCB 0x25                                                               ; +0x26, 0x4d063a\nDCB 0x2B                                                               ; +0x27, 0x4d063b\nDCB 0x28; int                                                          ; +0x28, 0x4d063c\nALIGN 2                                                                ; +0x29, 0x4d063d\nLDR             R1, =(a18 - 0x4D0644); jumptable 004D062C case 4       ; +0x2a, 0x4d063e\nADD             R1, PC; \"18\"                                           ; +0x2c, 0x4d0640\nB               loc_4D068A                                             ; +0x2e, 0x4d0642\nLDR             R1, =(a19 - 0x4D064A); jumptable 004D062C case 5       ; +0x30, 0x4d0644\nADD             R1, PC; \"19\"                                           ; +0x32, 0x4d0646\nB               loc_4D068A                                             ; +0x34, 0x4d0648\nLDR             R1, =(a17 - 0x4D0650); jumptable 004D062C case 6       ; +0x36, 0x4d064a\nADD             R1, PC; \"17\"                                           ; +0x38, 0x4d064c\nB               loc_4D068A                                             ; +0x3a, 0x4d064e\nLDR             R1, =(a16 - 0x4D0656); jumptable 004D062C case 7       ; +0x3c, 0x4d0650\nADD             R1, PC; \"16\"                                           ; +0x3e, 0x4d0652\nB               loc_4D068A                                             ; +0x40, 0x4d0654\nLDR             R1, =(a20 - 0x4D065C); jumptable 004D062C case 8       ; +0x42, 0x4d0656\nADD             R1, PC; \"20\"                                           ; +0x44, 0x4d0658\nB               loc_4D068A                                             ; +0x46, 0x4d065a\nLDR             R1, =(a21 - 0x4D0662); jumptable 004D062C case 9       ; +0x48, 0x4d065c\nADD             R1, PC; \"21\"                                           ; +0x4a, 0x4d065e\nB               loc_4D068A                                             ; +0x4c, 0x4d0660\nLDR             R1, =(a23 - 0x4D0668); jumptable 004D062C case 10      ; +0x4e, 0x4d0662\nADD             R1, PC; \"23\"                                           ; +0x50, 0x4d0664\nB               loc_4D068A                                             ; +0x52, 0x4d0666\nLDR             R1, =(a24 - 0x4D066E); jumptable 004D062C case 11      ; +0x54, 0x4d0668\nADD             R1, PC; \"24\"                                           ; +0x56, 0x4d066a\nB               loc_4D068A                                             ; +0x58, 0x4d066c\nLDR             R1, =(a25 - 0x4D0674); jumptable 004D062C case 12      ; +0x5a, 0x4d066e\nADD             R1, PC; \"25\"                                           ; +0x5c, 0x4d0670\nB               loc_4D068A                                             ; +0x5e, 0x4d0672\nLDR             R1, =(a26 - 0x4D067A); jumptable 004D062C case 13      ; +0x60, 0x4d0674\nADD             R1, PC; \"26\"                                           ; +0x62, 0x4d0676\nB               loc_4D068A                                             ; +0x64, 0x4d0678\nLDR             R1, =(a27 - 0x4D0680); jumptable 004D062C case 14      ; +0x66, 0x4d067a\nADD             R1, PC; \"27\"                                           ; +0x68, 0x4d067c\nB               loc_4D068A                                             ; +0x6a, 0x4d067e\nLDR             R1, =(a43 - 0x4D0686); jumptable 004D062C case 16      ; +0x6c, 0x4d0680\nADD             R1, PC; \"43\"                                           ; +0x6e, 0x4d0682\nB               loc_4D068A                                             ; +0x70, 0x4d0684\nLDR             R1, =(unk_939830 - 0x4D068C); jumptable 004D062C default case, case 15 ; +0x72, 0x4d0686\nADD             R1, PC; unk_939830 ; char *                            ; +0x74, 0x4d0688\nBL              sub_776584                                             ; +0x76, 0x4d068a\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x7a, 0x4d068e\nLDR             R3, [R5]                                               ; +0x7c, 0x4d0690\nMOV             R0, R4                                                 ; +0x7e, 0x4d0692\nCMP             R2, R3                                                 ; +0x80, 0x4d0694\nBEQ             loc_4D069C                                             ; +0x82, 0x4d0696\nBLX             __stack_chk_fail                                       ; +0x84, 0x4d0698\nADD             SP, SP, #0xC                                           ; +0x88, 0x4d069c\nPOP             {R4,R5,PC}                                             ; +0x8a, 0x4d069e", "xrefs": ["CurrencyRewardLayer::init @ 0x4d2354", "CurrencyRewardLayer::init @ 0x4d237a"], "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"}