Forgotten your password?

Forum Index > Alpha Programming Language > DC LockToKey
Author Message
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
procedure LockToKey(DWord srcbuf; DWord destbuf) {
  esi = srcbuf;
  edi = destbuf;
  eax = 'yeK$';
  stosd
  al = 32;
  stosb
  esi = @[esi+6];
  ecx = nil;

  while (byte ptr[esi+ecx] <> '|') {
    if (dword ptr[esi+ecx] == '=kP ') {
      break;
    }
    ecx++;
  }

  if (ecx < 3) {
    exit;
  }

  al = [esi];
  xor al, 5
  ah = al;
  shr ax, 4
  and ax, 0ff0h
  or al, ah
  [edi] = al;

  edx = nil;
  edx++;
  while (edx < ecx) {
    al = [esi+edx];
    xor al, [esi+edx-1]
    ah = al;
    shr ax, 4
    and ax, 0ff0h
    or al, ah
    [edi+edx] = al;
    edx++;
  }

  al = [edi];
  xor al, [edi+ecx-1]
  [edi] = al;

  edx = nil;
  while (edx < ecx) {
    al = [edi+edx];
    [esi+edx] = al;
    edx++;
  }

  edx = nil;
  while (edx < ecx) {
    lodsb

    if (al == 0) {
      eax = 'CD%/';
      stosd
      eax = '000N';
      stosd
      ax = '/%';
      stosw
    } elseif (al == 5) {
      eax = 'CD%/';
      stosd
      eax = '500N';
      stosd
      ax = '/%';
      stosw
    } elseif (al == 36) {
      eax = 'CD%/';
      stosd
      eax = '630N';
      stosd
      ax = '/%';
      stosw
    } elseif (al == 96) {
      eax = 'CD%/';
      stosd
      eax = '690N';
      stosd
      ax = '/%';
      stosw
    } elseif (al == 124) {
      eax = 'CD%/';
      stosd
      eax = '421N';
      stosd
      ax = '/%';
      stosw
    } elseif (al == 126) {
      eax = 'CD%/';
      stosd
      eax = '621N';
      stosd
      ax = '/%';
      stosw
    } else {
      stosb
    }
    edx++;
  }
  exit;
}
Forum Index > Alpha Programming Language > DC LockToKey