{"type": "func", "start": 5372022848, "end": 5372022954, "name": "LevelTools::artistForAudio", "pseudocode": "// \n// LevelTools::artistForAudio from 0x140329040 to 0x1403290aa (106 bytes)\n// \n// 3 xrefs:\n// > SongCell::loadFromObject @ 0x1400b4162\n// > LevelTools::getSongObject @ 0x14032d241\n// > SongInfoLayer::create_1 @ 0x140492436\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 LevelTools::artistForAudio(int a1)\n{\n  int result; // eax\n\n  switch ( a1 )\n  {\n    case -1:\n      result = 2;\n      break;\n    case 0:\n      result = 3;\n      break;\n    case 2:\n      result = 4;\n      break;\n    case 6:\n    case 7:\n    case 10:\n    case 12:\n    case 15:\n    case 16:\n    case 18:\n    case 32:\n    case 33:\n      result = 1;\n      break;\n    case 11:\n    case 13:\n    case 14:\n    case 17:\n      result = 5;\n      break;\n    case 19:\n    case 23:\n    case 24:\n    case 25:\n    case 36:\n      result = 6;\n      break;\n    case 20:\n    case 21:\n    case 37:\n      result = 7;\n      break;\n    case 22:\n      result = 11;\n      break;\n    case 27:\n    case 28:\n    case 29:\n    case 30:\n    case 31:\n    case 34:\n    case 35:\n      result = 8;\n      break;\n    case 38:\n      result = 10;\n      break;\n    case 39:\n      result = 9;\n      break;\n    default:\n      result = 0;\n      break;\n  }\n  return result;\n}", "assembly": "; \n; LevelTools::artistForAudio from 0x140329040 to 0x1403290aa (106 bytes)\n; \n; 3 xrefs:\n; > SongCell::loadFromObject @ 0x1400b4162\n; > LevelTools::getSongObject @ 0x14032d241\n; > SongInfoLayer::create_1 @ 0x140492436\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\ninc     ecx; switch 41 cases                                           ; +0x0, 0x140329040\ncmp     ecx, 28h                                                       ; +0x2, 0x140329042\nja      short def_140329063; jumptable 0000000140329063 default case, cases 1,3-5,8,9,26 ; +0x5, 0x140329045\nmovsxd  rax, ecx                                                       ; +0x7, 0x140329047\nlea     rdx, cs:140000000h                                             ; +0xa, 0x14032904a\nmovzx   eax, ds:(byte_1403290E0 - 140000000h)[rdx+rax]                 ; +0x11, 0x140329051\nmov     ecx, ds:(jpt_140329063 - 140000000h)[rdx+rax*4]                ; +0x19, 0x140329059\nadd     rcx, rdx                                                       ; +0x20, 0x140329060\njmp     rcx; switch jump                                               ; +0x23, 0x140329063\nmov     eax, 4; jumptable 0000000140329063 case 2                      ; +0x25, 0x140329065\nretn                                                                   ; +0x2a, 0x14032906a\nmov     eax, 3; jumptable 0000000140329063 case 0                      ; +0x2b, 0x14032906b\nretn                                                                   ; +0x30, 0x140329070\nmov     eax, 2; jumptable 0000000140329063 case -1                     ; +0x31, 0x140329071\nretn                                                                   ; +0x36, 0x140329076\nmov     eax, 5; jumptable 0000000140329063 cases 11,13,14,17           ; +0x37, 0x140329077\nretn                                                                   ; +0x3c, 0x14032907c\nmov     eax, 7; jumptable 0000000140329063 cases 20,21,37              ; +0x3d, 0x14032907d\nretn                                                                   ; +0x42, 0x140329082\nmov     eax, 1; jumptable 0000000140329063 cases 6,7,10,12,15,16,18,32,33 ; +0x43, 0x140329083\nretn                                                                   ; +0x48, 0x140329088\nmov     eax, 8; jumptable 0000000140329063 cases 27-31,34,35           ; +0x49, 0x140329089\nretn                                                                   ; +0x4e, 0x14032908e\nmov     eax, 6; jumptable 0000000140329063 cases 19,23-25,36           ; +0x4f, 0x14032908f\nretn                                                                   ; +0x54, 0x140329094\nmov     eax, 0Ah; jumptable 0000000140329063 case 38                   ; +0x55, 0x140329095\nretn                                                                   ; +0x5a, 0x14032909a\nmov     eax, 9; jumptable 0000000140329063 case 39                     ; +0x5b, 0x14032909b\nretn                                                                   ; +0x60, 0x1403290a0\nmov     eax, 0Bh; jumptable 0000000140329063 case 22                   ; +0x61, 0x1403290a1\nretn                                                                   ; +0x66, 0x1403290a6\nxor     eax, eax; jumptable 0000000140329063 default case, cases 1,3-5,8,9,26 ; +0x67, 0x1403290a7\nretn                                                                   ; +0x69, 0x1403290a9", "xrefs": ["SongCell::loadFromObject @ 0x1400b4162", "LevelTools::getSongObject @ 0x14032d241", "SongInfoLayer::create_1 @ 0x140492436"], "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"}