{"type": "func", "start": 5370288784, "end": 5370288984, "name": "GameManager::activeIconForType", "pseudocode": "// \n// GameManager::activeIconForType from 0x140181a90 to 0x140181b58 (200 bytes)\n// \n// 2 xrefs:\n// > GJGarageLayer::setupPage @ 0x140276139\n// > GJGarageLayer::getItems_1 @ 0x1402767b1\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 GameManager::activeIconForType(GameManager *a1, IconType a2)\n{\n  int result; // eax\n\n  switch ( a2 )\n  {\n    case Cube:\n      result = a1->m_playerFrame.random - a1->m_playerFrame.seed;\n      break;\n    case Ship:\n      result = a1->m_playerShip.random - a1->m_playerShip.seed;\n      break;\n    case Ball:\n      result = a1->m_playerBall.random - a1->m_playerBall.seed;\n      break;\n    case Ufo:\n      result = a1->m_playerBird.random - a1->m_playerBird.seed;\n      break;\n    case Wave:\n      result = a1->m_playerDart.random - a1->m_playerDart.seed;\n      break;\n    case Robot:\n      result = a1->m_playerRobot.random - a1->m_playerRobot.seed;\n      break;\n    case Spider:\n      result = a1->m_playerSpider.random - a1->m_playerSpider.seed;\n      break;\n    case Swing:\n      result = a1->m_playerSwing.random - a1->m_playerSwing.seed;\n      break;\n    case Jetpack:\n      result = a1->m_playerJetpack.random - a1->m_playerJetpack.seed;\n      break;\n    case DeathEffect:\n      result = a1->m_playerDeathEffect.random - a1->m_playerDeathEffect.seed;\n      break;\n    case Special:\n      result = a1->m_playerStreak.random - a1->m_playerStreak.seed;\n      break;\n    case ShipFire:\n      result = a1->m_playerShipFire.random - a1->m_playerShipFire.seed;\n      break;\n    default:\n      result = 0;\n      break;\n  }\n  return result;\n}", "assembly": "; \n; GameManager::activeIconForType from 0x140181a90 to 0x140181b58 (200 bytes)\n; \n; 2 xrefs:\n; > GJGarageLayer::setupPage @ 0x140276139\n; > GJGarageLayer::getItems_1 @ 0x1402767b1\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\ncmp     edx, 65h; switch 102 cases                                     ; +0x0, 0x140181a90\nja      def_140181AB7; jumptable 0000000140181AB7 default case, cases 9-97,100 ; +0x3, 0x140181a93\nmovsxd  rax, edx                                                       ; +0x9, 0x140181a99\nlea     r8, cs:140000000h                                              ; +0xc, 0x140181a9c\nmovzx   eax, ds:(byte_140181B8C - 140000000h)[r8+rax]                  ; +0x13, 0x140181aa3\nmov     edx, ds:(jpt_140181AB7 - 140000000h)[r8+rax*4]                 ; +0x1c, 0x140181aac\nadd     rdx, r8                                                        ; +0x24, 0x140181ab4\njmp     rdx; switch jump                                               ; +0x27, 0x140181ab7\nmov     eax, [rcx+2C4h]; jumptable 0000000140181AB7 case 0             ; +0x29, 0x140181ab9\nsub     eax, [rcx+2C8h]                                                ; +0x2f, 0x140181abf\nretn                                                                   ; +0x35, 0x140181ac5\nmov     eax, [rcx+2D0h]; jumptable 0000000140181AB7 case 1             ; +0x36, 0x140181ac6\nsub     eax, [rcx+2D4h]                                                ; +0x3c, 0x140181acc\nretn                                                                   ; +0x42, 0x140181ad2\nmov     eax, [rcx+2DCh]; jumptable 0000000140181AB7 case 2             ; +0x43, 0x140181ad3\nsub     eax, [rcx+2E0h]                                                ; +0x49, 0x140181ad9\nretn                                                                   ; +0x4f, 0x140181adf\nmov     eax, [rcx+2E8h]; jumptable 0000000140181AB7 case 3             ; +0x50, 0x140181ae0\nsub     eax, [rcx+2ECh]                                                ; +0x56, 0x140181ae6\nretn                                                                   ; +0x5c, 0x140181aec\nmov     eax, [rcx+2F4h]; jumptable 0000000140181AB7 case 4             ; +0x5d, 0x140181aed\nsub     eax, [rcx+2F8h]                                                ; +0x63, 0x140181af3\nretn                                                                   ; +0x69, 0x140181af9\nmov     eax, [rcx+300h]; jumptable 0000000140181AB7 case 5             ; +0x6a, 0x140181afa\nsub     eax, [rcx+304h]                                                ; +0x70, 0x140181b00\nretn                                                                   ; +0x76, 0x140181b06\nmov     eax, [rcx+30Ch]; jumptable 0000000140181AB7 case 6             ; +0x77, 0x140181b07\nsub     eax, [rcx+310h]                                                ; +0x7d, 0x140181b0d\nretn                                                                   ; +0x83, 0x140181b13\nmov     eax, [rcx+318h]; jumptable 0000000140181AB7 case 7             ; +0x84, 0x140181b14\nsub     eax, [rcx+31Ch]                                                ; +0x8a, 0x140181b1a\nretn                                                                   ; +0x90, 0x140181b20\nmov     eax, [rcx+348h]; jumptable 0000000140181AB7 case 99            ; +0x91, 0x140181b21\nsub     eax, [rcx+34Ch]                                                ; +0x97, 0x140181b27\nretn                                                                   ; +0x9d, 0x140181b2d\nmov     eax, [rcx+354h]; jumptable 0000000140181AB7 case 101           ; +0x9e, 0x140181b2e\nsub     eax, [rcx+358h]                                                ; +0xa4, 0x140181b34\nretn                                                                   ; +0xaa, 0x140181b3a\nmov     eax, [rcx+360h]; jumptable 0000000140181AB7 case 98            ; +0xab, 0x140181b3b\nsub     eax, [rcx+364h]                                                ; +0xb1, 0x140181b41\nretn                                                                   ; +0xb7, 0x140181b47\nmov     eax, [rcx+36Ch]; jumptable 0000000140181AB7 case 8             ; +0xb8, 0x140181b48\nsub     eax, [rcx+370h]                                                ; +0xbe, 0x140181b4e\nretn                                                                   ; +0xc4, 0x140181b54\nxor     eax, eax; jumptable 0000000140181AB7 default case, cases 9-97,100 ; +0xc5, 0x140181b55\nretn                                                                   ; +0xc7, 0x140181b57", "xrefs": ["GJGarageLayer::setupPage @ 0x140276139", "GJGarageLayer::getItems_1 @ 0x1402767b1"], "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"}