SHARE
TWEET

Untitled

a guest Jan 26th, 2020 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. /* WARNING (jumptable): Heritage AFTER dead removal. Example location: s0x0000000c : 0x100010cc */
  3. /* WARNING: Restarted to delay deadcode elimination for space: stack */
  4.  
  5. LRESULT KeyboardProc(int param_1,WPARAM param_2,uint param_3)
  6.  
  7. {
  8.   LRESULT LVar1;
  9.   uint lParam;
  10.   UINT Msg;
  11.   HWND hWnd;
  12.   byte pc_keycode;
  13.  
  14.                     /* 0x108f  1  KeyboardProc */
  15.   if (param_1 < 0) {
  16.     LVar1 = CallNextHookEx(Hhook,param_1,param_2,param_3);
  17.   }
  18.   else {
  19.     switch((int)(param_3 << 8) >> 0x18) {
  20.     case 0:
  21.       pc_keycode = 1;
  22.       break;
  23.     case 1:
  24.     case 2:
  25.     case 3:
  26.     case 4:
  27.     case 5:
  28.     case 6:
  29.     case 7:
  30.     case 8:
  31.     case 9:
  32.     case 10:
  33.     case 0x1f:
  34.     case 0x20:
  35.     case 0x21:
  36.     case 0x22:
  37.     case 0x23:
  38.     case 0x24:
  39.     case 0x25:
  40.       pc_keycode = (char)((param_3 << 8) >> 0x18) + 1;
  41.       break;
  42.     case 0xb:
  43.       pc_keycode = 0xc;
  44.       break;
  45.     case 0xc:
  46.       pc_keycode = 0xd;
  47.       break;
  48.     case 0xd:
  49.       pc_keycode = 0x2b;
  50.       break;
  51.     default:
  52.       pc_keycode = (byte)((param_3 << 8) >> 0x18);
  53.       break;
  54.     case 0x1b:
  55.       pc_keycode = 0x1a;
  56.       break;
  57.     case 0x1d:
  58.       pc_keycode = 0x1e;
  59.       break;
  60.     case 0x1e:
  61.       pc_keycode = 0x1f;
  62.       break;
  63.     case 0x26:
  64.       pc_keycode = 0x27;
  65.       break;
  66.     case 0x28:
  67.       pc_keycode = 0x1b;
  68.       break;
  69.     case 0x29:
  70.       pc_keycode = 0x2c;
  71.       break;
  72.     case 0x2a:
  73.       pc_keycode = 0x2d;
  74.       break;
  75.     case 0x2b:
  76.       pc_keycode = 0x2e;
  77.       break;
  78.     case 0x2c:
  79.       pc_keycode = 0x2f;
  80.       break;
  81.     case 0x2d:
  82.       pc_keycode = 0x30;
  83.       break;
  84.     case 0x2e:
  85.       pc_keycode = 0x31;
  86.       break;
  87.     case 0x2f:
  88.       pc_keycode = 0x32;
  89.       break;
  90.     case 0x30:
  91.       pc_keycode = 0x33;
  92.       break;
  93.     case 0x31:
  94.       pc_keycode = 0x34;
  95.       break;
  96.     case 0x32:
  97.       pc_keycode = 0x35;
  98.       break;
  99.     case 0x33:
  100.       pc_keycode = 0x73;
  101.       break;
  102.     case 0x34:
  103.       pc_keycode = 0x39;
  104.       break;
  105.     case 0x35:
  106.       pc_keycode = 0x79;
  107.       break;
  108.     case 0x36:
  109.       pc_keycode = 0x51;
  110.       param_3 = param_3 | 0x1000000;
  111.       break;
  112.     case 0x37:
  113.       pc_keycode = 0x49;
  114.       param_3 = param_3 | 0x1000000;
  115.       break;
  116.     case 0x38:
  117.       pc_keycode = 0x52;
  118.       param_3 = param_3 | 0x1000000;
  119.       break;
  120.     case 0x39:
  121.       pc_keycode = 0x53;
  122.       param_3 = param_3 | 0x1000000;
  123.       break;
  124.     case 0x3a:
  125.       pc_keycode = 0x48;
  126.       param_3 = param_3 | 0x1000000;
  127.       break;
  128.     case 0x3b:
  129.       pc_keycode = 0x4b;
  130.       param_3 = param_3 | 0x1000000;
  131.       break;
  132.     case 0x3c:
  133.       pc_keycode = 0x4d;
  134.       param_3 = param_3 | 0x1000000;
  135.       break;
  136.     case 0x3d:
  137.       pc_keycode = 0x50;
  138.       param_3 = param_3 | 0x1000000;
  139.       break;
  140.     case 0x3e:
  141.       pc_keycode = 0x47;
  142.       param_3 = param_3 | 0x1000000;
  143.       break;
  144.     case 0x3f:
  145.       pc_keycode = 0x4f;
  146.       param_3 = param_3 | 0x1000000;
  147.       break;
  148.     case 0x40:
  149.       pc_keycode = 0x4a;
  150.       break;
  151.     case 0x41:
  152.       pc_keycode = 0x35;
  153.       param_3 = param_3 | 0x1000000;
  154.       break;
  155.     case 0x42:
  156.     case 0x43:
  157.     case 0x44:
  158.     case 0x46:
  159.     case 0x47:
  160.     case 0x48:
  161.     case 0x49:
  162.     case 0x4a:
  163.     case 0x4b:
  164.     case 0x4c:
  165.       pc_keycode = (char)((param_3 << 8) >> 0x18) + 5;
  166.       break;
  167.     case 0x45:
  168.       pc_keycode = 0x37;
  169.       break;
  170.     case 0x4e:
  171.       pc_keycode = 0x52;
  172.       break;
  173.     case 0x50:
  174.       pc_keycode = 0x53;
  175.       break;
  176.     case 0x52:
  177.       pc_keycode = 0x57;
  178.       break;
  179.     case 0x53:
  180.       pc_keycode = 0x58;
  181.       break;
  182.     case 0x5b:
  183.       pc_keycode = 0x45;
  184.       param_3 = param_3 | 0x1000000;
  185.       break;
  186.     case 0x5c:
  187.       pc_keycode = 0x1c;
  188.       param_3 = param_3 | 0x1000000;
  189.       break;
  190.     case 0x5d:
  191.       pc_keycode = 0x46;
  192.       break;
  193.     case 0x5f:
  194.       pc_keycode = 0x29;
  195.       break;
  196.     case 0x60:
  197.       pc_keycode = 0x45;
  198.       break;
  199.     case 0x61:
  200.       pc_keycode = 0x37;
  201.       break;
  202.     case 0x62:
  203.     case 99:
  204.     case 100:
  205.     case 0x65:
  206.     case 0x66:
  207.     case 0x67:
  208.     case 0x68:
  209.     case 0x69:
  210.     case 0x6a:
  211.     case 0x6b:
  212.       pc_keycode = (char)((param_3 << 8) >> 0x18) - 0x27;
  213.       break;
  214.     case 0x70:
  215.       pc_keycode = 0x2a;
  216.       break;
  217.     case 0x71:
  218.       pc_keycode = 0x3a;
  219.       break;
  220.     case 0x72:
  221.       pc_keycode = 0x70;
  222.       break;
  223.     case 0x73:
  224.       pc_keycode = 0x38;
  225.       break;
  226.     case 0x74:
  227.       pc_keycode = 0x1d;
  228.       break;
  229.     case 0x75:
  230.       pc_keycode = 0x1d;
  231.       param_3 = param_3 | 0x1000000;
  232.       break;
  233.     case 0x76:
  234.       pc_keycode = 0x38;
  235.       param_3 = param_3 | 0x1000000;
  236.       break;
  237.     case 0x77:
  238.       pc_keycode = 0x5b;
  239.       break;
  240.     case 0x78:
  241.       pc_keycode = 0x5c;
  242.       break;
  243.     case 0x79:
  244.       pc_keycode = 0x5d;
  245.       break;
  246.     case 0x7d:
  247.       pc_keycode = 0x36;
  248.     }
  249.     lParam = (uint)pc_keycode << 0x10 | param_3 & 0xff00ffff;
  250.     Msg = 0x101 - (uint)((param_3 & 0x80000000) == 0);
  251.     hWnd = GetFocus();
  252.     PostMessageA(hWnd,Msg,param_2,lParam);
  253.     LVar1 = 1;
  254.   }
  255.   return LVar1;
  256. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top