{"type": "func", "start": 5371543664, "end": 5371544125, "name": "GJSmartTemplate::flipBlockType", "pseudocode": "// \n// GJSmartTemplate::flipBlockType from 0x1402b4070 to 0x1402b423d (461 bytes)\n// \n// 9 xrefs:\n// > GJSmartTemplate::flipKey @ 0x1402b48a9\n// > GJSmartTemplate::flipKey @ 0x1402b48b3\n// > GJSmartTemplate::flipKey @ 0x1402b48be\n// > GJSmartTemplate::flipKey @ 0x1402b48c8\n// > GJSmartTemplate::flipKey @ 0x1402b48d2\n// > GJSmartTemplate::flipKey @ 0x1402b48dd\n// > GJSmartTemplate::flipKey @ 0x1402b48e8\n// > GJSmartTemplate::flipKey @ 0x1402b48f3\n// > GJSmartTemplate::flipKey @ 0x1402b48fe\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\nSmartBlockType GJSmartTemplate::flipBlockType(SmartBlockType a1, bool a2, bool a3)\n{\n  SmartBlockType v3; // r9d\n  SmartBlockType result; // eax\n\n  v3 = a1;\n  if ( (unsigned int)(a1 - 48) <= 1 )\n    return v3;\n  if ( a2 )\n  {\n    switch ( a1 )\n    {\n      case NormalSlope1:\n        v3 = NormalSlope2;\n        break;\n      case NormalSlope2:\n        v3 = NormalSlope1;\n        break;\n      case NormalSlope3:\n        v3 = NormalSlope4;\n        break;\n      case NormalSlope4:\n        v3 = NormalSlope3;\n        break;\n      case WideSlope1:\n        v3 = WideSlope3;\n        break;\n      case WideSlope2:\n        v3 = WideSlope4;\n        break;\n      case WideSlope3:\n        v3 = WideSlope1;\n        break;\n      case WideSlope4:\n        v3 = WideSlope2;\n        break;\n      case WideSlope5:\n        v3 = WideSlope7;\n        break;\n      case WideSlope6:\n        v3 = WideSlope8;\n        break;\n      case WideSlope7:\n        v3 = WideSlope5;\n        break;\n      case WideSlope8:\n        v3 = WideSlope6;\n        break;\n      case WideSlope9:\n        v3 = WideSlope11;\n        break;\n      case WideSlope10:\n        v3 = WideSlope12;\n        break;\n      case WideSlope11:\n        v3 = WideSlope9;\n        break;\n      case WideSlope12:\n        v3 = WideSlope10;\n        break;\n      case WideSlope13:\n        v3 = WideSlope15;\n        break;\n      case WideSlope14:\n        v3 = WideSlope16;\n        break;\n      case WideSlope15:\n        v3 = WideSlope13;\n        break;\n      case WideSlope16:\n        v3 = WideSlope14;\n        break;\n      default:\n        break;\n    }\n  }\n  if ( !a3 )\n    return v3;\n  switch ( v3 )\n  {\n    case NormalSlope1:\n      result = NormalSlope3;\n      break;\n    case NormalSlope2:\n      result = NormalSlope4;\n      break;\n    case NormalSlope3:\n      result = NormalSlope1;\n      break;\n    case NormalSlope4:\n      result = NormalSlope2;\n      break;\n    case WideSlope1:\n      result = WideSlope5;\n      break;\n    case WideSlope2:\n      result = WideSlope6;\n      break;\n    case WideSlope3:\n      result = WideSlope7;\n      break;\n    case WideSlope4:\n      result = WideSlope8;\n      break;\n    case WideSlope5:\n      result = WideSlope1;\n      break;\n    case WideSlope6:\n      result = WideSlope2;\n      break;\n    case WideSlope7:\n      result = WideSlope3;\n      break;\n    case WideSlope8:\n      result = WideSlope4;\n      break;\n    case WideSlope9:\n      result = WideSlope13;\n      break;\n    case WideSlope10:\n      result = WideSlope14;\n      break;\n    case WideSlope11:\n      result = WideSlope15;\n      break;\n    case WideSlope12:\n      result = WideSlope16;\n      break;\n    case WideSlope13:\n      result = WideSlope9;\n      break;\n    case WideSlope14:\n      result = WideSlope10;\n      break;\n    case WideSlope15:\n      result = WideSlope11;\n      break;\n    case WideSlope16:\n      return WideSlope12;\n    default:\n      return v3;\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::flipBlockType from 0x1402b4070 to 0x1402b423d (461 bytes)\n; \n; 9 xrefs:\n; > GJSmartTemplate::flipKey @ 0x1402b48a9\n; > GJSmartTemplate::flipKey @ 0x1402b48b3\n; > GJSmartTemplate::flipKey @ 0x1402b48be\n; > GJSmartTemplate::flipKey @ 0x1402b48c8\n; > GJSmartTemplate::flipKey @ 0x1402b48d2\n; > GJSmartTemplate::flipKey @ 0x1402b48dd\n; > GJSmartTemplate::flipKey @ 0x1402b48e8\n; > GJSmartTemplate::flipKey @ 0x1402b48f3\n; > GJSmartTemplate::flipKey @ 0x1402b48fe\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\nlea     eax, [rcx-30h]                                                 ; +0x0, 0x1402b4070\nmov     r9d, ecx                                                       ; +0x3, 0x1402b4073\ncmp     eax, 1                                                         ; +0x6, 0x1402b4076\njbe     def_1402B4173; jumptable 00000001402B4173 default case, cases 58-64 ; +0x9, 0x1402b4079\nlea     r10, cs:140000000h                                             ; +0xf, 0x1402b407f\ntest    dl, dl                                                         ; +0x16, 0x1402b4086\njz      def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x18, 0x1402b4088\nlea     eax, [rcx-32h]; switch 27 cases                                ; +0x1e, 0x1402b408e\ncmp     eax, 1Ah                                                       ; +0x21, 0x1402b4091\nja      def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x24, 0x1402b4094\ncdqe                                                                   ; +0x2a, 0x1402b409a\nmov     ecx, ds:(jpt_1402B40A7 - 140000000h)[r10+rax*4]                ; +0x2c, 0x1402b409c\nadd     rcx, r10                                                       ; +0x34, 0x1402b40a4\njmp     rcx; switch jump                                               ; +0x37, 0x1402b40a7\nmov     r9d, 33h ; '3'; jumptable 00000001402B40A7 case 50             ; +0x39, 0x1402b40a9\njmp     def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x3f, 0x1402b40af\nmov     r9d, 32h ; '2'; jumptable 00000001402B40A7 case 51             ; +0x44, 0x1402b40b4\njmp     def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x4a, 0x1402b40ba\nmov     r9d, 35h ; '5'; jumptable 00000001402B40A7 case 52             ; +0x4f, 0x1402b40bf\njmp     def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x55, 0x1402b40c5\nmov     r9d, 34h ; '4'; jumptable 00000001402B40A7 case 53             ; +0x5a, 0x1402b40ca\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x60, 0x1402b40d0\nmov     r9d, 38h ; '8'; jumptable 00000001402B40A7 case 54             ; +0x62, 0x1402b40d2\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x68, 0x1402b40d8\nmov     r9d, 36h ; '6'; jumptable 00000001402B40A7 case 56             ; +0x6a, 0x1402b40da\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x70, 0x1402b40e0\nmov     r9d, 43h ; 'C'; jumptable 00000001402B40A7 case 65             ; +0x72, 0x1402b40e2\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x78, 0x1402b40e8\nmov     r9d, 41h ; 'A'; jumptable 00000001402B40A7 case 67             ; +0x7a, 0x1402b40ea\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x80, 0x1402b40f0\nmov     r9d, 39h ; '9'; jumptable 00000001402B40A7 case 55             ; +0x82, 0x1402b40f2\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x88, 0x1402b40f8\nmov     r9d, 37h ; '7'; jumptable 00000001402B40A7 case 57             ; +0x8a, 0x1402b40fa\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x90, 0x1402b4100\nmov     r9d, 44h ; 'D'; jumptable 00000001402B40A7 case 66             ; +0x92, 0x1402b4102\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0x98, 0x1402b4108\nmov     r9d, 42h ; 'B'; jumptable 00000001402B40A7 case 68             ; +0x9a, 0x1402b410a\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xa0, 0x1402b4110\nmov     r9d, 47h ; 'G'; jumptable 00000001402B40A7 case 69             ; +0xa2, 0x1402b4112\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xa8, 0x1402b4118\nmov     r9d, 45h ; 'E'; jumptable 00000001402B40A7 case 71             ; +0xaa, 0x1402b411a\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xb0, 0x1402b4120\nmov     r9d, 4Bh ; 'K'; jumptable 00000001402B40A7 case 73             ; +0xb2, 0x1402b4122\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xb8, 0x1402b4128\nmov     r9d, 49h ; 'I'; jumptable 00000001402B40A7 case 75             ; +0xba, 0x1402b412a\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xc0, 0x1402b4130\nmov     r9d, 48h ; 'H'; jumptable 00000001402B40A7 case 70             ; +0xc2, 0x1402b4132\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xc8, 0x1402b4138\nmov     r9d, 46h ; 'F'; jumptable 00000001402B40A7 case 72             ; +0xca, 0x1402b413a\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xd0, 0x1402b4140\nmov     r9d, 4Ch ; 'L'; jumptable 00000001402B40A7 case 74             ; +0xd2, 0x1402b4142\njmp     short def_1402B40A7; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xd8, 0x1402b4148\nmov     r9d, 4Ah ; 'J'; jumptable 00000001402B40A7 case 76             ; +0xda, 0x1402b414a\ntest    r8b, r8b; jumptable 00000001402B40A7 default case, cases 58-64 ; +0xe0, 0x1402b4150\njz      def_1402B4173; jumptable 00000001402B4173 default case, cases 58-64 ; +0xe3, 0x1402b4153\nlea     eax, [r9-32h]; switch 27 cases                                 ; +0xe9, 0x1402b4159\ncmp     eax, 1Ah                                                       ; +0xed, 0x1402b415d\nja      def_1402B4173; jumptable 00000001402B4173 default case, cases 58-64 ; +0xf0, 0x1402b4160\ncdqe                                                                   ; +0xf6, 0x1402b4166\nmov     ecx, ds:(jpt_1402B4173 - 140000000h)[r10+rax*4]                ; +0xf8, 0x1402b4168\nadd     rcx, r10                                                       ; +0x100, 0x1402b4170\njmp     rcx; switch jump                                               ; +0x103, 0x1402b4173\nmov     r9d, 34h ; '4'; jumptable 00000001402B4173 case 50             ; +0x105, 0x1402b4175\nmov     eax, r9d                                                       ; +0x10b, 0x1402b417b\nretn                                                                   ; +0x10e, 0x1402b417e\nmov     r9d, 35h ; '5'; jumptable 00000001402B4173 case 51             ; +0x10f, 0x1402b417f\nmov     eax, r9d                                                       ; +0x115, 0x1402b4185\nretn                                                                   ; +0x118, 0x1402b4188\nmov     r9d, 32h ; '2'; jumptable 00000001402B4173 case 52             ; +0x119, 0x1402b4189\nmov     eax, r9d                                                       ; +0x11f, 0x1402b418f\nretn                                                                   ; +0x122, 0x1402b4192\nmov     r9d, 33h ; '3'; jumptable 00000001402B4173 case 53             ; +0x123, 0x1402b4193\nmov     eax, r9d                                                       ; +0x129, 0x1402b4199\nretn                                                                   ; +0x12c, 0x1402b419c\nmov     r9d, 41h ; 'A'; jumptable 00000001402B4173 case 54             ; +0x12d, 0x1402b419d\nmov     eax, r9d                                                       ; +0x133, 0x1402b41a3\nretn                                                                   ; +0x136, 0x1402b41a6\nmov     r9d, 43h ; 'C'; jumptable 00000001402B4173 case 56             ; +0x137, 0x1402b41a7\nmov     eax, r9d                                                       ; +0x13d, 0x1402b41ad\nretn                                                                   ; +0x140, 0x1402b41b0\nmov     r9d, 36h ; '6'; jumptable 00000001402B4173 case 65             ; +0x141, 0x1402b41b1\nmov     eax, r9d                                                       ; +0x147, 0x1402b41b7\nretn                                                                   ; +0x14a, 0x1402b41ba\nmov     r9d, 38h ; '8'; jumptable 00000001402B4173 case 67             ; +0x14b, 0x1402b41bb\nmov     eax, r9d                                                       ; +0x151, 0x1402b41c1\nretn                                                                   ; +0x154, 0x1402b41c4\nmov     r9d, 42h ; 'B'; jumptable 00000001402B4173 case 55             ; +0x155, 0x1402b41c5\nmov     eax, r9d                                                       ; +0x15b, 0x1402b41cb\nretn                                                                   ; +0x15e, 0x1402b41ce\nmov     r9d, 44h ; 'D'; jumptable 00000001402B4173 case 57             ; +0x15f, 0x1402b41cf\nmov     eax, r9d                                                       ; +0x165, 0x1402b41d5\nretn                                                                   ; +0x168, 0x1402b41d8\nmov     r9d, 37h ; '7'; jumptable 00000001402B4173 case 66             ; +0x169, 0x1402b41d9\nmov     eax, r9d                                                       ; +0x16f, 0x1402b41df\nretn                                                                   ; +0x172, 0x1402b41e2\nmov     r9d, 39h ; '9'; jumptable 00000001402B4173 case 68             ; +0x173, 0x1402b41e3\nmov     eax, r9d                                                       ; +0x179, 0x1402b41e9\nretn                                                                   ; +0x17c, 0x1402b41ec\nmov     r9d, 49h ; 'I'; jumptable 00000001402B4173 case 69             ; +0x17d, 0x1402b41ed\nmov     eax, r9d                                                       ; +0x183, 0x1402b41f3\nretn                                                                   ; +0x186, 0x1402b41f6\nmov     r9d, 4Bh ; 'K'; jumptable 00000001402B4173 case 71             ; +0x187, 0x1402b41f7\nmov     eax, r9d                                                       ; +0x18d, 0x1402b41fd\nretn                                                                   ; +0x190, 0x1402b4200\nmov     r9d, 45h ; 'E'; jumptable 00000001402B4173 case 73             ; +0x191, 0x1402b4201\nmov     eax, r9d                                                       ; +0x197, 0x1402b4207\nretn                                                                   ; +0x19a, 0x1402b420a\nmov     r9d, 47h ; 'G'; jumptable 00000001402B4173 case 75             ; +0x19b, 0x1402b420b\nmov     eax, r9d                                                       ; +0x1a1, 0x1402b4211\nretn                                                                   ; +0x1a4, 0x1402b4214\nmov     r9d, 4Ah ; 'J'; jumptable 00000001402B4173 case 70             ; +0x1a5, 0x1402b4215\nmov     eax, r9d                                                       ; +0x1ab, 0x1402b421b\nretn                                                                   ; +0x1ae, 0x1402b421e\nmov     r9d, 4Ch ; 'L'; jumptable 00000001402B4173 case 72             ; +0x1af, 0x1402b421f\nmov     eax, r9d                                                       ; +0x1b5, 0x1402b4225\nretn                                                                   ; +0x1b8, 0x1402b4228\nmov     r9d, 46h ; 'F'; jumptable 00000001402B4173 case 74             ; +0x1b9, 0x1402b4229\nmov     eax, r9d                                                       ; +0x1bf, 0x1402b422f\nretn                                                                   ; +0x1c2, 0x1402b4232\nmov     r9d, 48h ; 'H'; jumptable 00000001402B4173 case 76             ; +0x1c3, 0x1402b4233\nmov     eax, r9d; jumptable 00000001402B4173 default case, cases 58-64 ; +0x1c9, 0x1402b4239\nretn                                                                   ; +0x1cc, 0x1402b423c", "xrefs": ["GJSmartTemplate::flipKey @ 0x1402b48a9", "GJSmartTemplate::flipKey @ 0x1402b48b3", "GJSmartTemplate::flipKey @ 0x1402b48be", "GJSmartTemplate::flipKey @ 0x1402b48c8", "GJSmartTemplate::flipKey @ 0x1402b48d2", "GJSmartTemplate::flipKey @ 0x1402b48dd", "GJSmartTemplate::flipKey @ 0x1402b48e8", "GJSmartTemplate::flipKey @ 0x1402b48f3", "GJSmartTemplate::flipKey @ 0x1402b48fe"], "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"}