Subversion Repositories Kolibri OS

Rev

Rev 1834 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1834 Rev 2296
Line 1... Line -...
1
; <--- description --->
-
 
2
; compiler:     FASM 1.67.21
1
; compiler:     FASM 1.67.21
3
; name:         ICQ for Kolibri
2
; name:         ICQ client for Kolibri
4
; version:      0.01
3
; version:      0.1.30
5
; written by:   LV
4
; written by:   LV
6
; e-mail:       lv4evil@ya.ru
5
; e-mail:       lv4evil@yandex.ru
Line 7... Line -...
7
 
-
 
8
 
6
 
9
; <--- include all MeOS stuff --->
7
 
10
include "lang.inc"
8
include "lang.inc"
11
include "../../../macros.inc"
9
include "MACROS.INC"
12
purge mov
10
;purge mov
13
;include "ASCL9/ascl.inc"
11
;include "ASCL9/ascl.inc"
Line 14... Line -...
14
;include "debug.inc"
-
 
15
include "EDITBOX.INC"
12
;include "debug.inc"
Line 16... Line 13...
16
 
13
include "editbox.inc"
17
; <--- start of MenuetOS application --->
14
 
18
MEOS_APP_START
15
MEOS_APP_START
-
 
16
 
-
 
17
;include "debug.inc"
-
 
18
include "2000.inc"
-
 
19
include "comp.inc"
Line 19... Line 20...
19
 
20
;include "fsio.inc"
Line -... Line 21...
-
 
21
include "dos2win.inc"
-
 
22
include "parser.inc"
-
 
23
include "ssi.inc"
-
 
24
 
20
;include "debug.inc"
25
use_edit_box procinfo,22,5
-
 
26
 
-
 
27
;
-
 
28
; …᫨ == 0, ª®¤ ¤«ï ¨á¯®«ì§®¢ ­¨ï ª®­â ªâ «¨áâ 
21
include "2000.inc"
29
; ­  á¥à¢¥à¥ ­¥  áᥬ¡«¨àã¥âáï 
Line 22... Line 30...
22
include "comp.inc"
30
;
23
 
31
USE_SSI = 1
24
use_edit_box procinfo,22,5
32
;
Line -... Line 33...
-
 
33
;
-
 
34
 
-
 
35
CODE
-
 
36
    
-
 
37
    
-
 
38
    ;mov eax, 40
-
 
39
    ;mov ebx, 47h
-
 
40
    ;int 40h
-
 
41
 
-
 
42
    ;
-
 
43
    ; ‡ £à㧪  ª®­ä¨£®¢
-
 
44
    ;
-
 
45
 
-
 
46
    mov  eax, fname
-
 
47
    call    parseconf
-
 
48
    ;
-
 
49
    ; ‚뢮¤ § £à㦥­­®© ¨­ä®à¬ æ¨¨
25
 
50
    ;
26
; <--- start of code --->
51
 
Line 27... Line 52...
27
CODE
52
    mov eax, cfg_message
Line 28... Line 53...
28
    
53
    xor ebx, ebx
29
    
54
    call writemsg
30
    ;mov eax, 40
55
 
31
    ;mov ebx, 47h
56
    call showcfg
-
 
57
 
Line 32... Line 58...
32
    ;int 40h
58
   
33
   
59
    ;call    loaduin
34
    call    loaduin
60
    call    draw_window 	   ; at first create and draw the window
35
    call    draw_window 	   ; at first create and draw the window
61
    
Line 49... Line 75...
49
    je	    button		   ;     jump to button handler
75
    je	    button		   ;     jump to button handler
Line 50... Line 76...
50
   
76
   
51
    ;
77
    ;
52
    ; †¤¥¬ ¤ ­­ëå
78
    ; †¤¥¬ ¤ ­­ëå
53
    ;
-
 
54
    mov     eax, 53
-
 
55
    mov     ebx, 2
79
    ;
56
    push    ecx
80
    
57
    mov     ecx, [socket]
-
 
58
    int     0x40
-
 
59
    pop     ecx
81
    mcall 53,2,[socket]
60
    cmp     eax, 0
82
    cmp     eax, 0
Line 61... Line 83...
61
    jnz     read_socket
83
    jnz     read_socket
62
 
84
 
63
    mouse_edit_box inputbox
85
    mouse_edit_box inputbox
64
    ;
86
    ;
65
    ; …᫨ ¥áâì ᮥ¤¨­¥­¨¥ á á¥à¢¥à®¬, ¯®áë« ¥¬ ¯ ª¥âë - ¯®¤â¢¥¦¤¥­¨ï ª ¦¤ë¥ 60 á
87
    ; …᫨ ¥áâì ᮥ¤¨­¥­¨¥ á á¥à¢¥à®¬, ¯®áë« ¥¬ ¯ ª¥âë - ¯®¤â¢¥¦¤¥­¨ï ª ¦¤ë¥ 60 á
Line 66... Line 88...
66
    ;
88
    ; ­¥ âॡã¥âáï
Line 67... Line 89...
67
    call    sendkeep
89
;    call    sendkeep
68
    
90
    
69
    jmp     wait_event		   ;   else return to the start of main cycle
91
    jmp     wait_event		   ;   else return to the start of main cycle
Line 70... Line 92...
70
 
92
 
71
 
-
 
-
 
93
 
72
  redraw:			   ; redraw event handler
94
  redraw:			   ; redraw event handler
Line 73... Line 95...
73
    call    draw_window
95
    call    draw_window
74
    jmp     wait_event
96
    jmp     wait_event
Line 86... Line 108...
86
 
108
 
Line 87... Line 109...
87
    jmp     wait_event
109
    jmp     wait_event
88
 
110
 
89
 
111
 
-
 
112
  button:			   ; button event handler
Line 90... Line 113...
90
  button:			   ; button event handler
113
    ;mov     eax, 17		   ;   get button identifier
91
    mov     eax, 17		   ;   get button identifier
114
    ;int     0x40
Line 92... Line 115...
92
    int     0x40
115
    mcall 17
Line 129... Line 152...
129
    imul ebx, eax
152
    imul ebx, eax
130
    lea eax, [names+ebx]
153
    lea eax, [names + ebx]
131
    mov [buff+ecx], ' ' ; à®¡¥«
154
    mov [buff + ecx], ' ' ; à®¡¥«
132
    lea ebx, [buff+ecx+1]
155
    lea ebx, [buff + ecx + 1]
133
    mov ecx, NAME_LEN
156
    mov ecx, NAME_LEN
-
 
157
    ;debug
-
 
158
     push ebx
-
 
159
     mov ebx, NAME_LEN
-
 
160
     call print_mem
-
 
161
     pop ebx
-
 
162
    ;
134
    call strcpy
163
    call strcpy
135
    mov eax, buff
164
    mov eax, buff
136
    xor ebx, ebx
165
    xor ebx, ebx
137
    call writemsg
166
    call writemsg
Line 141... Line 170...
141
 
170
 
142
  @@:
171
  @@:
143
    cmp     ah, 1
172
    cmp     ah, 1
Line 144... Line 173...
144
    jne     wait_event		   ;   return if button id != 1
173
    jne     wait_event		   ;   return if button id != 1
145
 
174
 
Line 146... Line 175...
146
    or	    eax, -1		   ;   exit application
175
    ;   exit application
147
    int     0x40
176
    mcall -1
148
 
177
 
149
 
-
 
150
  draw_window:
178
 
151
    mov     eax, 12		   ; start drawing
-
 
152
    mov     ebx, 1
179
  draw_window:
153
    int     0x40
-
 
154
 
-
 
155
    mov     eax, 0		   ; create and draw the window
-
 
156
    mov     ebx, 100*65536+700	   ;   (window_cx)*65536+(window_sx)
-
 
157
    mov     ecx, 100*65536+500	   ;   (window_cy)*65536+(window_sy)
-
 
158
    mov     edx, 0x03ffffff	   ;   work area color & window type 3
-
 
159
;   mov     esi, 0                 ;   grab color (not used)
-
 
160
;   mov     edi, 0                 ;   frame color (not used)
-
 
161
    int     0x40
-
 
162
 
-
 
163
    mov     eax, 4		   ; window header
-
 
164
    mov     ebx, 8*65536+8	   ;   coordinates
-
 
Line 165... Line 180...
165
    mov     ecx, 0x10ffffff	   ;   color & font N1
180
    ; start drawing
Line 166... Line 181...
166
    mov     edx, header 	   ;   address of text
181
    mcall 12,1
Line 176... Line 191...
176
    draw_button 530, 460, 60, 15, 4, 'SEND'
191
    draw_button 530, 460, 60, 15, 4, 'SEND'
Line 177... Line 192...
177
 
192
 
178
    call printbuff
193
    call    printbuff
Line -... Line 194...
-
 
194
    call    buttonbox
-
 
195
 
-
 
196
    ;
-
 
197
    ; Image
-
 
198
    ;
-
 
199
    ;mov eax, 7
-
 
200
    ;mov ebx, redicq
-
 
201
    ;mov ecx, 15*65536+15
-
 
202
    ;mov edx, 100*65536+100
-
 
203
    ;int 40h
Line -... Line 204...
-
 
204
 
179
    call    buttonbox
205
 
180
    
206
    
181
 
-
 
Line 182... Line 207...
182
    mov     eax, 12		   ; finish drawing
207
 
Line 183... Line 208...
183
    mov     ebx, 2
208
   ; finish drawing
184
    int     0x40
209
   mcall 12,2
185
 
210
 
186
  ret
211
  ret
-
 
212
 
-
 
213
;
-
 
214
;  ‘®¥¤¨­¥­¨¥
-
 
215
;
-
 
216
  connect:
187
 
217
  lea eax, [vtable + vartable.icqip]
188
;
218
  call ip_parser
189
;  ‘®¥¤¨­¥­¨¥
219
  call htonl
190
;
-
 
-
 
220
  data_debug 'IP:', eax
Line 191... Line 221...
191
  connect:
221
 
Line 304... Line 334...
304
    ; ¢ ¯à¥¤ë¤ã饬 横«¥
334
    ; ¢ ¯à¥¤ë¤ã饬 横«¥
305
    ;
335
    ;
306
    cmp [hrf], 1
336
    cmp [hrf], 1
307
    jz rs_head_recived
337
    jz rs_head_recived
Line 308... Line -...
308
 
-
 
-
 
338
 
309
 
339
  rs_check_sock:
310
    mov eax, 53
340
    ;mov eax, 53
311
    mov ebx, 2
341
    ;mov ebx, 2
312
    mov ecx, [socket]
342
    ;mov ecx, [socket]
-
 
343
    ;int 40h
313
    int 40h
344
    mcall 53,2,[socket]
314
    cmp eax, 6 ; Flap head size
345
    cmp eax, 6 ; Flap head size
315
    jc r_end
346
    jc r_end
316
    ;
347
    ;
317
    ; à¨­¨¬ ¥¬ § £®«®¢®ª
348
    ; à¨­¨¬ ¥¬ § £®«®¢®ª
318
    ;
349
    ;
Line 319... Line 350...
319
    xor edx, edx
350
    xor edx, edx
320
 
351
 
321
    ;mov ecx, [socket]
352
    ;mov ecx, [socket]
322
   rs_loop:
353
   rs_loop:
323
    mov eax,  53
-
 
324
    mov ebx, 3
354
    ;mov eax,  53
-
 
355
    ;mov ebx, 3
Line 325... Line 356...
325
    
356
    ;int 40h
326
    int 40h
357
    mcall 53,3,[socket]
327
 
358
 
Line 363... Line 394...
363
    ;
394
    ;
364
    ;  à®¢¥à塞, ¯®«ãç¥­ë «¨ ¤ ­­ë¥
395
    ;  à®¢¥à塞, ¯®«ãç¥­ë «¨ ¤ ­­ë¥
365
    ;
396
    ;
366
  rs_head_recived:
397
  rs_head_recived:
Line 367... Line 398...
367
 
398
 
368
    mov eax, 53
399
    ;mov eax, 53
369
    mov ebx, 2
400
    ;mov ebx, 2
370
    ;mov ecx, [socket]
401
    ;mov ecx, [socket]
-
 
402
    ;int 40h
-
 
403
    mcall 53,2,[socket]
371
    int 40h
404
 
372
    cmp ax, [rflap.wDs]   ;  §¬¥à ¤ ­­ëå
405
    cmp ax, [rflap.wDs]   ;  §¬¥à ¤ ­­ëå
373
    jc r_end
406
    jc r_end
374
    ;
407
    ;
375
    ;
408
    ;
Line 388... Line 421...
388
 
421
 
389
   rs_data_loop:
422
   rs_data_loop:
390
    cmp edx, esi
423
    cmp edx, esi
Line 391... Line 424...
391
    jz rs_data_end
424
    jz rs_data_end
392
 
425
 
393
    mov eax, 53
426
    ;mov eax, 53
-
 
427
    ;mov ebx, 3
394
    mov ebx, 3
428
    ;int 40h
395
    int 40h
429
    mcall 53,3,[socket]
396
    mov [mbuff+edx], bl
430
    mov [mbuff+edx], bl
Line 397... Line 431...
397
    inc edx
431
    inc edx
398
    jmp rs_data_loop
432
    jmp rs_data_loop
399
 
433
 
400
    ;
434
    ;
401
    ; „ ­­ë¥ ¯à¨­ïâë
435
    ; „ ­­ë¥ ¯à¨­ïâë
402
    ;
436
    ;
403
    rs_data_end:
437
    rs_data_end:
404
    mov [hrf], 0
438
    mov [hrf], 0
405
    write_debug 'Some data received'
439
    ;write_debug 'Some data recived'
406
    ;
440
    ;
407
    ;
441
    ;
408
    ;
442
    ;
-
 
443
    cmp [login], 0
-
 
444
    jz rs_login
-
 
445
    call main_loop
409
    cmp [login], 0
446
    ;
-
 
447
    ; …áâì á¬ëá« ¯à®¢¥à¨âì ᮪¥â ­  ­ «¨ç¨¥ á«¥¤ãî饣® § £®«®¢ª 
Line 410... Line 448...
410
    jz rs_login
448
    ;
411
    call main_loop
449
    ;jmp r_end
412
    jmp r_end
450
    jmp rs_check_sock
413
 
451
 
-
 
452
 
Line 414... Line 453...
414
 
453
    rs_login:
415
    rs_login:
454
    call srv_login
416
    call srv_login
455
    ;write_debug 'Exited srv_login'
417
    ;write_debug 'Exited srv_login'
456
    ;jmp r_end
Line 430... Line 469...
430
    ;
469
    ;
431
    ;  ‘«¨èª®¬ ¡®«ì让 ¯ ª¥â!
470
    ;  ‘«¨èª®¬ ¡®«ì让 ¯ ª¥â!
432
    ;
471
    ;
433
    rs_big_flap:
472
    rs_big_flap:
Line 434... Line 473...
434
 
473
 
435
    write_debug 'Too BIG FLAP Received'
474
    write_debug 'Too BIG FLAP Recived'
Line 436... Line 475...
436
    mov [hrf], 0
475
    mov [hrf], 0
437
 
476
 
438
    mov ecx, [socket]
477
    ;mov ecx, [socket]
439
    mov ax, [rflap.wDs]
478
    mov ax, [rflap.wDs]
440
    xor esi, esi     
479
    xor esi, esi     
Line 441... Line 480...
441
    mov esi, eax
480
    mov esi, eax
442
    xor edx, edx
481
    xor edx, edx
443
 
482
 
Line 444... Line 483...
444
   rs_data_loop2:
483
   rs_data_loop2:
445
    cmp edx, esi
484
    cmp edx, esi
446
    jz r_end
485
    jz r_end
-
 
486
 
447
 
487
    ;mov eax, 53
448
    mov eax, 53
488
    ;mov ebx, 3
449
    mov ebx, 3
489
    ;int 40h
Line 477... Line 517...
477
    mov    ecx, 1000	     ; Ž¯à¥¤¥«ï¥¬ «®ª «ì­ë© ¯®àâ, ­ ç¨­ ¥¬ á 1000
517
    mov    ecx, 1000	     ; Ž¯à¥¤¥«ï¥¬ «®ª «ì­ë© ¯®àâ, ­ ç¨­ ¥¬ á 1000
Line 478... Line 518...
478
 
518
 
479
    getlp:
519
    getlp:
480
    inc    ecx
520
    inc    ecx
481
    push   ecx
521
    push   ecx
482
    mov    eax, 53
522
    ;mov    eax, 53
483
    mov    ebx, 9
523
    ;mov    ebx, 9
-
 
524
    ;int    0x40
484
    int    0x40
525
    mcall 53,9,ecx
485
    pop    ecx
526
    pop    ecx
486
    cmp    eax, 0	     ; íâ®â «®ª «ì­ë© ¯®à⠨ᯮ«ì§ã¥âáï?
527
    cmp    eax, 0	     ; íâ®â «®ª «ì­ë© ¯®à⠨ᯮ«ì§ã¥âáï?
487
    jz	   getlp	     ; ¤  - ¯à®¤®«¦ ¥¬ ¯¥à¥¡¨à âì
528
    jz	   getlp	     ; ¤  - ¯à®¤®«¦ ¥¬ ¯¥à¥¡¨à âì
488
    ;OK ecx = port number
529
    ;OK ecx = port number
489
    ;Open Socket
530
    ;Open Socket
490
    mov eax, 53
531
    ;mov eax, 53
491
    mov ebx, 5
532
    ;mov ebx, 5
492
    xor edx, edx
533
    xor edx, edx
493
    ;mov dx, ICQ_PORT
534
    ;mov dx, ICQ_PORT
494
    pop edx
535
    pop edx
495
    ;mov esi,ICQ_IP
536
    ;mov esi,ICQ_IP
Line 496... Line 537...
496
    mov edi, 1;SOCKET_ACTIVE
537
    ;mov edi, 1;SOCKET_ACTIVE
-
 
538
 
497
 
539
    ;int 40h
498
    int 040h
540
    mcall 53, 5, ecx, edx, esi, 1
-
 
541
    ;
499
    ;
542
    mov [socket], eax
500
    mov [socket], eax
543
 
501
    ;
544
    ;
502
    ; †¤¥¬ ãáâ ­®¢ª¨ ᮥ¤¨¥­¨ï
545
    ; †¤¥¬ ãáâ ­®¢ª¨ ᮥ¤¨¥­¨ï
Line -... Line 546...
-
 
546
    mov ecx, eax
-
 
547
  srv_loop:
-
 
548
 
-
 
549
    ;mov eax, 5
-
 
550
    ;mov ebx, 50
-
 
551
    ;int 40h
-
 
552
    mcall 5, 50
503
    mov ecx, eax
553
 
504
  srv_loop:
554
 
505
    
555
    
-
 
556
    ;mov eax, 53
506
    mov eax, 53
557
    ;mov ebx, 6
507
    mov ebx, 6
558
    ;int 40h
508
    int 40h
559
    mcall 53, 6, ecx
509
    cmp eax, TCB_ESTABLISHED 
560
    cmp eax, TCB_ESTABLISHED 
510
    jz fin
561
    jz fin
511
    cmp eax, 11
-
 
512
    jae @f
-
 
513
    ;
-
 
514
    mov eax, 5
-
 
Line -... Line 562...
-
 
562
    cmp eax, 11
-
 
563
    jae c_end
-
 
564
    ;
-
 
565
    
Line -... Line 566...
-
 
566
    ;inc [timer]
-
 
567
    ;cmp [timer], 50
515
    mov ebx, 50
568
    ;jz srv_err
516
    int 40h
569
    jmp srv_loop
517
    jmp srv_loop
570
 
518
 
571
 
519
 
572
 
520
 
573
  ;srv_err:
521
 
574
    ;mov [timer], word 0
Line 522... Line 575...
522
    ;cmp eax,-1
575
    ;cmp eax,-1
523
    ;jnz fin
576
    ;jnz fin
524
    ;delay 100
577
    ;delay 100
525
    write_debug 'CONNECTION FAILED'		      ;®¤ª«î祭¨¥ ­¥ 㤠«®áì
578
    write_debug	'CONNECTION FAILED'                   ;®¤ª«î祭¨¥ ­¥ 㤠«®áì
526
    jmp @f
579
    jmp c_end
527
    ;connrcted:  
580
    ;connrcted:  
528
					  ;CONNECTED
581
					  ;CONNECTED
529
    
582
    
530
    fin:
583
    fin:
Line 531... Line 584...
531
    write_debug 'Connected!!!!'
584
    write_debug 'Connected!!!!'
532
  @@:
585
  c_end:
533
    pop edi 
586
    pop edi 
534
    pop esi 
-
 
535
    pop edx 
-
 
-
 
587
    pop esi 
536
    pop ecx 
588
    pop edx 
537
    ;pop ebx
589
    pop ecx 
538
  ret
590
    ;pop ebx
539
 
591
  ret
540
;
592
 
Line 573... Line 625...
573
    ;”®à¬¨à㥬 ¯ ª¥â ¤«ï ᮥ¤¨­¥­¨ï
625
    ;”®à¬¨à㥬 ¯ ª¥â ¤«ï ᮥ¤¨­¥­¨ï
574
    ;
626
    ;
575
    ;mov [flap.bId], FLAP_ID
627
    ;mov [flap.bId], FLAP_ID
576
    mov [flap.bCh], NEW_CONNECTION
628
    mov [flap.bCh], NEW_CONNECTION
Line 577... Line 629...
577
    
629
    
578
    mov eax, 26
630
    ;mov eax, 26
579
    mov ebx, 9
631
    ;mov ebx, 9
-
 
632
    ;int 40h
580
    int 40h
633
    mcall 26, 9
Line 581... Line 634...
581
    mov [seq], ax
634
    mov [seq], ax
582
 
635
 
583
    mov [flap.wSn], ax	    ; Sequence number
636
    mov [flap.wSn], ax      ; Sequence number
584
    ;mov [buff],0
637
    ;mov [buff],0
585
    ;mov [buff+1],0
638
    ;mov [buff+1],0
586
    ;mov [buff+2],0
639
    ;mov [buff+2],0
587
    mov dword [buff], 0x01000000 ;login Protokol version  00 00 00 01
640
    mov dword [buff], 0x01000000 ;login Protokol version  00 00 00 01
Line 588... Line 641...
588
    ;mov[buff+4],0
641
    ;mov[buff+4],0
589
    mov word [buff+4], 0x0100; TLV.TYPE = UIN     00 01
642
    mov word [buff+4], 0x0100; TLV.TYPE = UIN     00 01
590
 
643
 
591
    mov eax, UIN
644
    lea eax, [vtable + vartable.uin]
592
    call strlen
645
    call strlen
593
    mov [buff+6], ah
646
    mov [buff+6], ah
Line 594... Line 647...
594
    mov [buff+7], al ; Length of UIN 
647
    mov [buff+7], al ; Length of UIN 
Line 595... Line 648...
595
    mov edx, eax
648
    mov edx, eax
596
    add edx, 7		       ; ¢ edx ¤«¨­  § ¯®«­¥­­®£® ¡ãä¥à 
649
    add edx, 7                 ; ¢ edx ¤«¨­  § ¯®«­¥­­®£® ¡ãä¥à 
Line 597... Line 650...
597
    
650
    
Line 598... Line 651...
598
    mov ecx, eax	      ;„«¨­  áâப¨
651
    mov ecx, eax              ;„«¨­  áâப¨
599
 
652
 
Line 600... Line 653...
600
    mov eax, UIN
653
    lea eax, [vtable + vartable.uin]
601
    lea ebx, [buff+8]	      ; + à §¬¥à ¤ ­­ëå ¢ ¡ãä¥à¥ + 1 
654
    lea ebx, [buff+8]         ; + à §¬¥à ¤ ­­ëå ¢ ¡ãä¥à¥ + 1 
-
 
655
 
602
 
656
    call strcpy
Line 603... Line 657...
603
    call strcpy
657
 
604
 
658
    
605
    
659
    lea eax, [vtable + vartable.pass]
606
    mov eax, PASS
660
    call roast
607
    call roast
661
    
608
    
662
    mov [buff+edx+2], 2 ; TLV.TYPE - rosted password
609
    mov [buff+edx+2], 2 ; TLV.TYPE - rosted password
663
    call strlen
610
    call strlen
664
    mov [buff+edx+4], al
Line 611... Line 665...
611
    mov word [buff+edx+4], ax  ; Length of pass
665
    mov [buff+edx+3], ah  ; Length of pass
612
 
666
 
613
    add edx, 4
667
    add edx, 4
614
    mov ebx, buff
668
    mov ebx, buff
-
 
669
    add ebx, edx               ; ­ §­ ç¥­¨¥
Line 615... Line 670...
615
    add ebx, edx	       ; ­ §­ ç¥­¨¥
670
    add edx, eax               ; ‘®å࠭塞 ¢ EDX ¤«¨­ã § ¯®«­¥­­®£® ¡ãä­à 
616
    add edx, eax	       ; ‘®å࠭塞 ¢ EDX ¤«¨­ã § ¯®«­¥­­®£® ¡ãä­à 
671
    mov ecx, eax               ; „«¨­  áâப¨
617
    mov ecx, eax	       ; „«¨­  áâப¨
672
    lea eax, [vtable + vartable.pass]              ; ˆáâ®ç­¨ª
618
    mov eax, PASS	       ; ˆáâ®ç­¨ª
673
    inc ebx
619
    inc ebx
674
    call strcpy
620
    call strcpy
675
    
621
    
676
    mov [buff+edx+2], 3 ; TLV.TYPE - client id string
622
    mov [buff+edx+2], 3 ; TLV.TYPE - client id string
677
    mov eax, ID_STRING
Line -... Line 678...
-
 
678
    call strlen
-
 
679
    mov [buff+edx+4], al
623
    mov eax, ID_STRING
680
    mov [buff+edx+3], ah
624
    call strlen
681
 
-
 
682
    add edx, 4
-
 
683
    mov ecx, eax
625
    mov word [buff+edx+4], ax
684
    mov ebx, buff
626
 
685
    add ebx, edx
Line 627... Line 686...
627
    add edx, 4
686
    add edx, eax
628
    mov ecx, eax
687
    inc ebx
-
 
688
    mov eax, ID_STRING
-
 
689
    call strcpy
629
    mov ebx, buff
690
 
630
    add ebx, edx
691
    xor eax, eax
Line 631... Line 692...
631
    add edx, eax
692
 
632
    inc ebx
693
    mov [buff+edx+2], 016h  ; TLV.TYPE - Client id
-
 
694
    mov [buff+edx+4], 2
-
 
695
    mov ax, ID_NUM
633
    mov eax, ID_STRING
696
    call htons
634
    call strcpy
697
    mov word [buff+edx+5], ax
Line 635... Line 698...
635
 
698
    add edx, 6
636
    mov [buff+edx+2], 016h  ; TLV.TYPE - Client id
699
 
-
 
700
    mov [buff+edx+2], 017h ; Client major version
-
 
701
    mov [buff+edx+4], 2
637
    mov [buff+edx+4], 2
702
    mov ax, MAJOR
638
    mov word [buff+edx+6], ID_NUM
703
    call htons
Line 639... Line 704...
639
    add edx, 6
704
    mov word [buff+edx+5], ax
640
 
705
    add edx, 6
-
 
706
 
-
 
707
    mov [buff+edx+2], 018h ; Client minor version
641
    mov [buff+edx+2], 017h ; Client major version
708
    mov [buff+edx+4], 2
642
    mov [buff+edx+4], 2
709
    mov ax, MINOR
Line 643... Line 710...
643
    mov [buff+edx+6], MAJOR
710
    call htons
644
    add edx, 6
711
    mov word [buff+edx+5], ax
-
 
712
    add edx, 6
-
 
713
 
645
 
714
    mov [buff+edx+2], 019h ; Client lesser version
646
    mov [buff+edx+2], 018h ; Client minor version
715
    mov [buff+edx+4], 2
Line 647... Line 716...
647
    mov [buff+edx+4], 2
716
    mov ax, LESSER
648
    mov [buff+edx+6], MINOR
717
    call htons
649
    add edx, 6
718
    mov word [buff+edx+5], ax
Line 674... Line 743...
674
    inc ebx
743
    inc ebx
675
    add edx, eax
744
    add edx, eax
676
    mov eax, CL_LANG
745
    mov eax, CL_LANG
677
    call strcpy
746
    call strcpy
Line 678... Line 747...
678
 
747
 
679
    mov [buff+edx+2], 0Fh ; Client language
748
    mov [buff+edx+2], 0Eh ; Client country
680
    mov eax, CL_COUNTRY
749
    mov eax, CL_COUNTRY
681
    call strlen
750
    call strlen
682
    mov word [buff+edx+4], ax
751
    mov word [buff+edx+4], ax
683
    add edx, 4
752
    add edx, 4
Line 735... Line 804...
735
   uin_loop:
804
   uin_loop:
736
    xor eax, eax
805
    xor eax, eax
737
    mov ax, word [mbuff+ebx]
806
    mov ax, word [mbuff+ebx]
738
    cmp ax, 0100h	       ;  00 01 TLV.Type UIN
807
    cmp ax, 0100h              ;  00 01 TLV.Type UIN
739
    jz l_uin_ok 		 ;  ’¥¯¥àì á¥à¢¥à ¯¥à¥¤ ¥â ¥é¥ ¤ ­­ë¥ ¯à¨ ᮥ¤¨­¥­¨¨,   ¯®â®¬ ®¯ïâì
808
    jz l_uin_ok                  ;  ’¥¯¥àì á¥à¢¥à ¯¥à¥¤ ¥â ¥é¥ ¤ ­­ë¥ ¯à¨ ᮥ¤¨­¥­¨¨,   ¯®â®¬ ®¯ïâì
740
    add ebx, 5			       ; â®â ¦¥ TLV 1
809
    add ebx, 5                   ; â®â ¦¥ TLV 1  (­®¢ë© ä®à¬ â ¯ ª¥ªâ )
741
    cmp ebx, 5
810
    cmp ebx, 5
742
    ja l_tlvt_err
811
    ja l_tlvt_err
743
    jmp uin_loop
812
    jmp uin_loop
Line 802... Line 871...
802
    ;                         
871
    ;                         
803
    ;  ‘®¥¤¨­ï¥¬áï á BOS    
872
    ;  ‘®¥¤¨­ï¥¬áï á BOS    
804
    ;                       
873
    ;                       
805
    ;call srv_disconnect
874
    ;call srv_disconnect
806
    mov ecx, [socket]
875
    mov ecx, [socket]
807
    ;write_debug 'Closing socket'
876
    write_debug 'Closing socket'
808
    ;call closesocket
877
    ;call closesocket
809
    ;
878
    ;
810
    ;
879
    ;
811
    ;mov eax, 53
880
    ;
812
    ;mov ebx, 8
881
    ;FIXME!!!
-
 
882
    ;‡ ª®¬¬¥­â®à®¢ ­® ¨§-§  ¯à®¡«¥¬ë á á¥â¥¢ë¬ á⥪®¬
-
 
883
    ;§ ªàë⨥ ᮪¥â  § ¢¥è¨¢ ¥â á¨á⥬ã
813
    ;int 40h
884
    ;mcall 53, 8, ecx
814
 
-
 
Line 815... Line 885...
815
 
885
 
816
 
886
 
Line 844... Line 914...
844
    l_data_err:
914
    l_data_err:
845
    write_debug 'LOGIN DATA MISMATCH'
915
    write_debug 'LOGIN DATA MISMATCH'
846
    jmp l_fin
916
    jmp l_fin
Line 847... Line 917...
847
 
917
 
848
    l_len_err:
918
    l_len_err:
849
    write_debug 'RECEIVED DATA LENGTH MISMATCH'
919
    write_debug 'RECIVED DATA LENGTH MISMATCH'
Line 850... Line 920...
850
    jmp l_fin
920
    jmp l_fin
851
 
921
 
852
    l_tlvt_err:
922
    l_tlvt_err:
Line 856... Line 926...
856
    l_ch_err:
926
    l_ch_err:
857
    write_debug 'FLAP CHANNEL MISMATCH'
927
    write_debug 'FLAP CHANNEL MISMATCH'
858
    jmp l_fin
928
    jmp l_fin
Line 859... Line 929...
859
 
929
 
860
    l_flap_err:
930
    l_flap_err:
Line 861... Line 931...
861
    write_debug 'FLAP ID MISMATCH / RECEIVE ERROR'
931
    write_debug 'FLAP ID MISMATCH / RECIVE ERROR'
Line 862... Line 932...
862
 
932
 
863
    l_fin:
933
    l_fin:
864
 
934
 
865
    ;
935
    ;
866
    ; ¥®¡å®¤¨¬® § ªàëâì ᮪¥â
936
    ; ¥®¡å®¤¨¬® § ªàëâì ᮪¥â
867
    ;
937
    ;
868
    ;call srv_disconnect
938
    ;call srv_disconnect
869
    ;call closesocket
939
    call closesocket
870
    l_end:
940
    l_end:
871
    pop edx
941
    pop edx
Line 955... Line 1025...
955
    popf    
1025
    popf    
956
  ret
1026
  ret
Line 957... Line 1027...
957
 
1027
 
-
 
1028
 
-
 
1029
;
-
 
1030
; Œ ªà®á ¤«ï áà ¢­¥­¨ï áâப
-
 
1031
;
-
 
1032
macro strcmp first, second, len
-
 
1033
{
-
 
1034
   push ecx
-
 
1035
   push esi
-
 
1036
   push edi
-
 
1037
 
-
 
1038
   mov ecx, len
-
 
1039
   mov esi, first
-
 
1040
   mov edi, second
-
 
1041
   repe cmpsb
-
 
1042
 
-
 
1043
   pop edi
-
 
1044
   pop esi
-
 
1045
   pop ecx
-
 
1046
 
-
 
1047
}
-
 
1048
 
958
 
1049
 
959
;
1050
;
960
; ‡ ¯®«­ï¥â ¡ãä¥à, ¯®  ¤à¥áã ¢ ebx
1051
; ‡ ¯®«­ï¥â ¡ãä¥à, ¯®  ¤à¥áã ¢ ebx
961
; ¤ ­­ë¬¨, ¯®  ¤à¥áã eax, ¢
1052
; ¤ ­­ë¬¨, ¯®  ¤à¥áã eax, ¢
962
; cx  - ’¨¯ TLV
1053
; cx  - ’¨¯ TLV
Line 1029... Line 1120...
1029
    call strcpy
1120
    call strcpy
Line 1030... Line 1121...
1030
 
1121
 
Line 1031... Line 1122...
1031
    xchg ecx, edx	    ; ecx - handle, edx - data size
1122
    xchg ecx, edx           ; ecx - handle, edx - data size
1032
 
1123
 
1033
    s_wait:
1124
    s_wait:
1034
    mov eax, 53 	    ; à®¢¥à塞 á®áâ®ï­¨¥ ᮪¥â . …᫨ ᮥ¤¨¥­¨¥
1125
    ;mov eax, 53             ; à®¢¥à塞 á®áâ®ï­¨¥ ᮪¥â . …᫨ ᮥ¤¨¥­¨¥
-
 
1126
    ;mov ebx, 6              ; ãáâ ­®¢«¥­® - ¯®áë« ¥¬ ¡ãä¥à, ¥á«¨ ᮪¥â § ªàëâ, ã室¨¬
1035
    mov ebx, 6		    ; ãáâ ­®¢«¥­® - ¯®áë« ¥¬ ¡ãä¥à, ¥á«¨ ᮪¥â § ªàëâ, ã室¨¬
1127
    ;int 40h
1036
    int 40h
1128
    mcall 53, 6, ecx
1037
    cmp eax, TCB_ESTABLISHED ; ãáâ ­®¢«¥­®
1129
    cmp eax, TCB_ESTABLISHED ; ãáâ ­®¢«¥­®
1038
    jz s_est
1130
    jz s_est
1039
    cmp eax, TCB_CLOSED 
1131
    cmp eax, TCB_CLOSED 
1040
    jz s_fin
1132
    jz s_fin
Line 1041... Line 1133...
1041
    cmp eax, 12 	   ;  “ ¬¥­ï â ª®¥ ¡ë«®, ª®£¤  ᮥ¤¨­¥­¨¥ ãáâ ­ ¢«¨¢ «®áì á ¯ãáâ®â®© :-)
1133
    cmp eax, 12            ;  “ ¬¥­ï â ª®¥ ¡ë«®, ª®£¤  ᮥ¤¨­¥­¨¥ ãáâ ­ ¢«¨¢ «®áì á ¯ãáâ®â®© :-)
1042
    jnc s_fin		   ;
1134
    jnc s_fin              ;
1043
 
1135
 
-
 
1136
    
1044
    
1137
    ;mov eax, 5
Line 1045... Line 1138...
1045
    mov eax, 5
1138
    ;mov ebx, 1
1046
    mov ebx, 1
1139
    ;int 40h                ; †¤¥¬
1047
    int 40h		   ; †¤¥¬
1140
    mcall 5, 1
1048
    jmp s_wait
-
 
-
 
1141
    jmp s_wait
1049
 
1142
 
1050
 
1143
 
1051
    s_est:
1144
    s_est:
-
 
1145
    ;mov eax, 53
Line 1052... Line 1146...
1052
    mov eax, 53
1146
    ;mov ebx, 7             ; ¯¨á âì ¢ ᮪¥â
1053
    mov ebx, 7		   ; ¯¨á âì ¢ ᮪¥â
1147
  
1054
    ;xchg ecx, edx          ; ecx - handle, edx - data length
1148
    add edx, 6             ; + size of header
1055
    add edx, 6		   ; + size of header
1149
    ;mov esi, sbuff         ; data
1056
    mov esi, sbuff	   ; data
1150
    ;int 40h
1057
    int 40h
1151
    mcall 53, 7, ecx, edx, sbuff
1058
 
1152
 
1059
    s_fin:
1153
    s_fin:
Line 1060... Line -...
1060
    pop ecx
-
 
1061
    pop ebx
-
 
1062
    pop esi
-
 
1063
    ;pop ecx
-
 
1064
    pop edx
-
 
1065
    popf
-
 
1066
  ret
-
 
1067
 
-
 
1068
;
-
 
1069
; à¨­¨¬ ¥â ¯ ª¥â ¨§ ᮪¥â 
-
 
1070
; eax - 㪠§ â¥«ì ­  FLAP_head
-
 
1071
; ebx - 㪠§ â¥«ì ­  ¬ áᨢ
-
 
1072
; ecx - 奭¤« ᮪¥â 
-
 
1073
; ‚®§¢à é ¥â ¢ eax ª®«¨ç¥á⢮ ¯à¨­ïâëå ¡ ©â ¢ ¬ áᨢ¥
-
 
1074
;
-
 
1075
;  recvflap:
-
 
1076
;    pushf
-
 
1077
;
-
 
1078
;    ;push eax
-
 
1079
;    push ebx
-
 
1080
;    push esi
-
 
1081
;    push edi
-
 
1082
;    push edx
-
 
1083
;    mov esi, eax
-
 
1084
;    mov edi, ebx
-
 
1085
;
-
 
1086
;    r_fail:
-
 
1087
;    mov eax, 53         ;  Ž¯à è¨¢  ¥¬ ᮪¥â
-
 
1088
;    mov ebx, 2          ;  ¢ eax ª®«¨ç¥á⢮ ¯®«ã祭­ëå ¡ ©â
-
 
1089
;    int 40h             ;
-
 
1090
;    cmp eax, 6          ;  ¡ãä¥à ­¥ ¯ãá⮩
-
 
1091
;    jnc r_ok
-
 
1092
;    
-
 
1093
;    mov eax, 53         ;  ®«ãç ¥¬ á®áâ®ï­¨¥ ᮪¥â  
-
 
1094
;    mov ebx, 6          ;
-
 
1095
;    int 40h             ;
-
 
1096
;
-
 
1097
;    cmp eax, TCB_CLOSED ; § ªàëâ - ã室¨¬
-
 
1098
;    jz r_err
-
 
1099
;
-
 
1100
;
-
 
1101
;   ;mov eax, 5         ; ¦¤¥¬
-
 
1102
;    ;mov ebx, 1
-
 
1103
;    ;int 40h
-
 
1104
;    ; ã室¨¬
-
 
1105
;
-
 
1106
;    ;jmp r_fail
-
 
1107
;    jmp rf_fin
-
 
1108
;
-
 
1109
;    r_ok:               ; ‚ ¡ãä¥à¥ ¤ ­­ë¥
-
 
1110
;    
-
 
1111
;    mov eax, 53
-
 
1112
;    mov ebx, 3
-
 
1113
;    int 40h
-
 
1114
;    mov [esi], bl       ; flap.bId
-
 
1115
;    cmp bl, FLAP_ID
-
 
1116
;    jnz r_err
-
 
1117
;    
-
 
1118
;    mov eax, 53
-
 
1119
;    mov ebx, 3
-
 
1120
;    int 40h
-
 
1121
;    mov [esi+1], bl   ; flap.bCh
-
 
1122
;   
-
 
1123
;    mov eax, 53
-
 
1124
;    mov ebx, 3
-
 
1125
;    int 40h
-
 
1126
;    mov [esi+3], bl   ; flap.wSn áâ à訩 ¡ ©â
-
 
1127
;
-
 
1128
;    mov eax, 53
-
 
1129
;    mov ebx, 3
-
 
1130
;    int 40h
-
 
1131
;    mov [esi+2], bl   ; flap.wSn ¬« ¤è¨© ¡ ©â
-
 
1132
;
-
 
1133
;    mov eax, 53
-
 
1134
;    mov ebx, 3
-
 
1135
;    int 40h
-
 
1136
;    mov [esi+5], bl   ; flap.wDs áâ à訩 ¡ ©â
-
 
1137
;
-
 
1138
;    mov eax, 53
-
 
1139
;    mov ebx, 3
-
 
1140
;    int 40h
-
 
1141
;    mov [esi+4], bl   ; flap.wDs ¬« ¤è¨© ¡ ©â
-
 
1142
;
-
 
1143
;    r_check:
-
 
1144
;    mov eax, 53       ; à®¢¥à塞 ç¨á«® ¯®«ã祭­ëå ¡ ©â
-
 
1145
;    mov eax, 2
-
 
1146
;    int 40h
-
 
1147
;    
-
 
1148
;    xor ebx, ebx
-
 
1149
;    mov bx, word [esi+4] ; flap.wDs
-
 
1150
;    cmp eax, ebx
-
 
1151
;    jnc r_drr           ;>=
-
 
1152
;    
-
 
1153
;    mov eax, 68           ; wait
-
 
1154
;    mov ebx, 1
-
 
1155
;    int 40h
-
 
1156
;    jmp r_check
-
 
1157
;    
-
 
1158
;    r_drr:            ; ready for data  recive
-
 
1159
;
-
 
1160
;
-
 
1161
;    xor edx, edx
-
 
1162
;    mov dx, word [esi+4] ; flap.wDs
-
 
1163
;    xor esi, esi
-
 
1164
;    
-
 
1165
;    rf_loop:
-
 
1166
;    mov eax, 53
-
 
1167
;    mov ebx, 3
-
 
1168
;    int 40h
-
 
1169
;    mov [edi+esi], bl
-
 
1170
;    inc esi
-
 
1171
;    cmp esi, edx
-
 
1172
;    jnz rf_loop
-
 
1173
;    mov eax, edx 
-
 
1174
;    jmp rf_fin
-
 
1175
; 
-
 
1176
;    r_err:
-
 
1177
;    ;pop ebx
-
 
1178
;    ;pop eax
-
 
1179
;    mov eax, -1
-
 
1180
;    jmp rf_fin
-
 
1181
;
-
 
1182
;
-
 
Line 1183... Line 1154...
1183
;    rf_fin:
1154
    pop ecx
1184
;    pop edx
1155
    pop ebx
1185
;    pop edi
1156
    pop esi
1186
;    pop esi
1157
    ;pop ecx
Line 1249... Line 1220...
1249
;  <-- ECX - 奭¤« ᮪¥â , ª®â®àë© ­ã¦­® § ªàëâì
1220
;  <-- ECX - 奭¤« ᮪¥â , ª®â®àë© ­ã¦­® § ªàëâì
1250
;  --> ECX - ¥§ã«ìâ â (¥­ ¤¥¦­®)
1221
;  --> ECX - ¥§ã«ìâ â (¥­ ¤¥¦­®)
1251
;
1222
;
1252
  closesocket:
1223
  closesocket:
1253
    push eax
1224
    push eax
1254
    push ebx
1225
    ;push ebx
Line 1255... Line 1226...
1255
 
1226
 
1256
    mov eax, 53
1227
    ;mov eax, 53
1257
    mov ebx, 8
1228
    ;mov ebx, 8
-
 
1229
    ;int 40h
Line 1258... Line 1230...
1258
    int 40h
1230
    mcall 53, 8, ecx
Line 1259... Line 1231...
1259
 
1231
 
1260
    mov ecx, eax
1232
    mov ecx, eax
1261
 
1233
 
Line 1262... Line 1234...
1262
    pop ebx
1234
    ;pop ebx
1263
    pop eax
1235
    pop eax
Line 1302... Line 1274...
1302
    push esi
1274
    push esi
1303
    push edi
1275
    push edi
Line 1304... Line 1276...
1304
 
1276
 
1305
    xor ecx, ecx
1277
    xor ecx, ecx
1306
    ;xor eax, eax
1278
    ;xor eax, eax
1307
    xor ebx, ebx
1279
    mov ebx, eax
1308
    xor edx, edx
1280
    xor edx, edx
1309
    xor esi, esi
1281
    xor esi, esi
Line 1310... Line 1282...
1310
    xor edi, edi 
1282
    xor edi, edi 
1311
   
1283
   
1312
    ip_loop:
1284
    ip_loop:
1313
    xor eax, eax
1285
    xor eax, eax
1314
    ;xor edx, edx
1286
    ;xor edx, edx
1315
    mov al, [bos_address+ecx]
1287
    mov al, [ebx+ecx]
Line 1316... Line 1288...
1316
    cmp al, '.'
1288
    cmp al, '.'
1317
    jz ip_dot
1289
    jz ip_dot
Line 1360... Line 1332...
1360
    mov eax, par_buff
1332
    mov eax, par_buff
1361
    call ascitoint
1333
    call ascitoint
1362
    shl esi, 8	     ; ‘¤¢¨£ ¥¬ ¯à¥¤ë¤ã騩 ¡ ©â
1334
    shl esi, 8       ; ‘¤¢¨£ ¥¬ ¯à¥¤ë¤ã騩 ¡ ©â
1363
    add esi, eax
1335
    add esi, eax
1364
    ;mov eax, esi     ; IP ¢ 16 à¨ç­®© ä®à¬¥
1336
    ;mov eax, esi     ; IP ¢ 16 à¨ç­®© ä®à¬¥
1365
    ;xor ebx, ebx    ; ®¬¥à  ¯®àâ  ­¥â
1337
    xor ebx, ebx    ; ®¬¥à  ¯®àâ  ­¥â
1366
    jmp ip_end
1338
    jmp ip_end
Line 1367... Line 1339...
1367
 
1339
 
1368
    @@: 			   ; ë«® :
1340
    @@:                            ; ë«® :
1369
    mov [par_buff+edx], 0	   
1341
    mov [par_buff+edx], 0          
Line 1606... Line 1578...
1606
    jz m_keep_alive	     ;
1578
    jz m_keep_alive          ;
1607
    ;
1579
    ;
1608
    ; Ž¡à ¡®âª  à áᮥ¤¨­¥­¨ï
1580
    ; Ž¡à ¡®âª  à áᮥ¤¨­¥­¨ï
1609
    ;
1581
    ;
1610
  m_close_conn:
1582
  m_close_conn:
1611
    write_debug 'Another Computer is Using YOUR UIN!'
1583
    write_debug 'Another Computer Use YOUR UIN!'
1612
    call srv_disconnect
1584
    call srv_disconnect
1613
    call closesocket
1585
    call closesocket
1614
    jmp m_fin
1586
    jmp m_fin
1615
    ;
1587
    ;
1616
    ; ®¡à ¡®âª  ᮥ¤¨­¥­¨ï
1588
    ; ®¡à ¡®âª  ᮥ¤¨­¥­¨ï
Line 1627... Line 1599...
1627
 
1599
 
1628
    ;
1600
    ;
1629
    ; £¥­¥à¨à㥬 á«ãç ©­ë© seq
1601
    ; £¥­¥à¨à㥬 á«ãç ©­ë© seq
1630
    ; „«ï í⮣® ¡¥à¥¬ ¢à¥¬ï, ¯à®è¥¤è¥¥ á ¬®¬¥­â  § ¯ã᪠ á¨á⥬ë
1602
    ; „«ï í⮣® ¡¥à¥¬ ¢à¥¬ï, ¯à®è¥¤è¥¥ á ¬®¬¥­â  § ¯ã᪠ á¨á⥬ë
1631
    ;
1603
    ;
1632
    mov eax, 26
1604
    ;mov eax, 26
1633
    mov ebx, 9
1605
    ;mov ebx, 9
-
 
1606
    ;int 40h
1634
    int 40h
1607
    mcall 26, 9
1635
    mov [seq], ax
1608
    mov [seq], ax
1636
    ;
1609
    ;
1637
    ; Žâ¤ ¥¬ á¥à¢¥àã cookie
1610
    ; Žâ¤ ¥¬ á¥à¢¥àã cookie
1638
    ;
1611
    ;
Line 1879... Line 1852...
1879
 
1852
 
Line 1880... Line 1853...
1880
    jmp m_fin
1853
    jmp m_fin
1881
 
1854
 
1882
 
1855
 
Line 1883... Line 1856...
1883
  m_snac_1_other:
1856
  m_snac_1_other:
Line 1997... Line 1970...
1997
    ;
1970
    ;
1998
  m_snac_3_b:
1971
  m_snac_3_b:
1999
    ;
1972
    ;
2000
    ; ˆ§ ¢á¥© ¨­ä®à¬ æ¨¨ ¯®ª  ­ã¦¥­ ⮫쪮 áâ âãá
1973
    ; ˆ§ ¢á¥© ¨­ä®à¬ æ¨¨ ¯®ª  ­ã¦¥­ ⮫쪮 áâ âãá
2001
    ;
1974
    ;
2002
    xor edx, edx	   ; ‘ç¥â稪
1975
    xor edx, edx           ; ‘ç¥â稪 - ­®¬¥à UIN ¢ ¬ áᨢ¥
2003
    xor ecx, ecx
1976
    xor ecx, ecx
2004
    xor eax, eax
1977
    xor eax, eax
2005
    cld 	    ; ‚ ­ ¯à ¢«¥­¨¨ 㢥«¨ç¥­¨ï  ¤à¥á®¢
1978
    cld             ; ‚ ­ ¯à ¢«¥­¨¨ 㢥«¨ç¥­¨ï  ¤à¥á®¢
Line 2006... Line 1979...
2006
 
1979
 
Line 2021... Line 1994...
2021
    jnz m_snac_3_b_loop
1994
    jnz m_snac_3_b_loop
2022
    ;
1995
    ;
2023
    ; UIN Ž¯à¥¤¥«¥­
1996
    ; UIN Ž¯à¥¤¥«¥­
2024
    ;
1997
    ;
Line -... Line 1998...
-
 
1998
 
-
 
1999
    ;
-
 
2000
    ;  ©â¨ TLV á® áâ âãᮬ
-
 
2001
    ; á®åà ­ïâì edx
-
 
2002
 
-
 
2003
    xor esi, esi    ; ‘ç¥â稪 TLV
-
 
2004
 
2025
 
2005
    xor ecx, ecx                      
2026
    lea ecx, [eax+10+11]	   ; +sizeof SNAC_head + offset #2 TLV
2006
    mov ch, byte [mbuff + eax + 13]   ; Š®«-¢® TLV ¢ 楯®çª¥
-
 
2007
    mov cl, byte [mbuff + eax + 14]   ;
-
 
2008
 
2027
    mov ax, word [mbuff+ecx]		;#2 TLV.Type
2009
    lea eax, [eax + 10 + 5]    ; eax 㪠§ â¥«ì ­  楯®çªã TLV
-
 
2010
    lea eax, [mbuff + eax]     ;
-
 
2011
 
-
 
2012
 
-
 
2013
  m_snac_3_b_next_tlv:
2028
    cmp ax, 0C00h		   ;dc info (optional)
2014
    cmp esi, ecx
-
 
2015
    jz m_snac_3_b_endchain
-
 
2016
 
-
 
2017
 
-
 
2018
    xor ebx, ebx
-
 
2019
    mov bh, [eax]              ;
-
 
2020
    mov bl, [eax + 1]          ; TLV.Type
-
 
2021
 
-
 
2022
    data_debug 'TLV type', ebx
2029
    jz m_snac_3_b_dc
2023
 
2030
    cmp ax, 0A00h		   ;external ip address
2024
    cmp ebx, 0x06              ;TLV.Type(0x06) - user status
-
 
2025
    jz m_snac_3_b_status
-
 
2026
 
-
 
2027
    ;
-
 
2028
    ;  §¡¨à ¥¬ 楯®çªã ¤ «ìè¥
-
 
2029
    ;
-
 
2030
 
-
 
2031
    get_next_tlv
2031
    jz m_snac_3_b_extip
2032
    inc esi
-
 
2033
    jmp m_snac_3_b_next_tlv
Line -... Line 2034...
-
 
2034
 
-
 
2035
 
-
 
2036
 
-
 
2037
    ; FIXME ¥®¯â¨¬ «ì­® - ª®¤ ¡ã¤¥â 㤠«¥­
-
 
2038
    ;
-
 
2039
    ;lea ecx, [eax+10+11]           ; +sizeof SNAC_head + offset #2 TLV
-
 
2040
    ;mov ax, word [mbuff+ecx]            ;#2 TLV.Type
-
 
2041
    ;cmp ax, 0C00h                  ;dc info (optional)
-
 
2042
    ;jz m_snac_3_b_dc
-
 
2043
    ;cmp ax, 0A00h                  ;external ip address
-
 
2044
    ;jz m_snac_3_b_extip
2032
    jmp m_snac_3_b_bad_tlv
2045
    ;jmp m_snac_3_b_bad_tlv
2033
    
2046
    
2034
 
2047
 
2035
  m_snac_3_b_dc:
2048
  ;m_snac_3_b_dc:
2036
    ;
2049
    ;
2037
    ; à®¯ã᪠¥¬ íâ®â TLV
2050
    ; à®¯ã᪠¥¬ íâ®â TLV
2038
    ;
2051
    ;
2039
    lea ecx, [ecx+41]
2052
    ;lea ecx, [ecx+41]
2040
  m_snac_3_b_extip:
2053
  ;m_snac_3_b_extip:
2041
    ;
2054
    ;
2042
    ; ˆ íâ®â :-)
2055
    ; ˆ íâ®â :-)
2043
    lea ecx, [ecx+8]
2056
    ;lea ecx, [ecx+8]
2044
    mov ax, word [mbuff+ecx]
2057
    ;mov ax, word [mbuff+ecx]
-
 
2058
    ;cmp ax, 0600h                 ;TLV.Type(0x0A) - external ip address
-
 
2059
    ;jz m_snac_3_b_status
-
 
2060
    ;jmp m_snac_3_b_bad_tlv
Line 2045... Line 2061...
2045
    cmp ax, 0600h		  ;TLV.Type(0x0A) - external ip address
2061
    ;
2046
    jz m_snac_3_b_status
2062
    ;
2047
    jmp m_snac_3_b_bad_tlv
2063
 
2048
 
2064
 
-
 
2065
  m_snac_3_b_status:
-
 
2066
    ;
2049
  m_snac_3_b_status:
2067
    ; áâ âãá
2050
    ;
2068
    ;
2051
    ; ­ ª®­¥æ-â® áâ âãá 8-)
2069
    mov ecx, eax
2052
    ;
2070
    mov eax, dword [ecx + 4]
2053
    mov eax, dword [mbuff+ecx+4]
2071
    ;mov eax, dword [mbuff+ecx+4]
2054
    call ntohl
2072
    call ntohl
Line 2070... Line 2088...
2070
 
2088
 
2071
  m_snac_3_b_end:
2089
  m_snac_3_b_end:
2072
    write_debug 'UIN not in local Contact List'
2090
    write_debug 'UIN not in local Contact List'
Line -... Line 2091...
-
 
2091
    jmp m_fin
-
 
2092
 
-
 
2093
  m_snac_3_b_endchain:
Line 2073... Line 2094...
2073
    jmp m_fin
2094
    jmp m_fin
2074
 
2095
 
2075
 
2096
 
Line 2113... Line 2134...
2113
 
2134
 
2114
 
2135
 
2115
 
2136
 
Line 2116... Line 2137...
2116
 
2137
 
2117
  m_snac_3_other:
2138
  m_snac_3_other:
Line 2329... Line 2350...
2329
    mov eax, MESS
2350
    mov eax, MESS
2330
    mov ebx, buff
2351
    mov ebx, buff
2331
    call strcpy
2352
    call strcpy
Line 2332... Line 2353...
2332
 
2353
 
-
 
2354
    lea ebx, [ebx + ecx]
-
 
2355
 
-
 
2356
    ;
-
 
2357
    ; ¥¯«®å® ¡ë«® ¡ë ¢ë¢¥á⨠­¥ UIN   Nickname, ¥á«¨ ®­ ¥áâì ¢ ª®­â ªâ «¨áâ¥
-
 
2358
    ;
-
 
2359
    xor esi, esi    ; ‘ç¥â稪
-
 
2360
 
-
 
2361
   m_snac_ch1_next_uin:
-
 
2362
 
-
 
2363
    cmp esi, UINS
-
 
2364
    jz m_snac_ch1_notfound
-
 
2365
 
-
 
2366
    mov edx, UIN_LEN
-
 
2367
    imul edx, esi
-
 
2368
 
-
 
2369
    lea edx, [uins + edx]
-
 
2370
    movzx ecx, byte [ui.bUinLength] 
-
 
2371
    strcmp edx, ui.bUin, ecx
-
 
2372
    jz m_snac_ch1_uin
-
 
2373
 
-
 
2374
    inc esi
-
 
2375
    jmp m_snac_ch1_next_uin
-
 
2376
 
-
 
2377
 
-
 
2378
    ;
-
 
2379
    ; ®¤å®¤ï騩 UIN ¥áâì ¢ ª®­â ªâ-«¨áâ¥
-
 
2380
    ;
-
 
2381
   m_snac_ch1_uin:
-
 
2382
 
-
 
2383
    mov edx, NAME_LEN
-
 
2384
    imul edx, esi
-
 
2385
 
-
 
2386
    lea edx, [names + edx]
-
 
2387
    mov eax, edx
-
 
2388
 
-
 
2389
 
-
 
2390
    call strlen
-
 
2391
    mov ecx, eax
-
 
2392
 
-
 
2393
    mov eax, edx
-
 
2394
    call strcpy
-
 
2395
 
-
 
2396
    jmp m_snac_ch1_msgfrom
-
 
2397
 
-
 
2398
 
-
 
2399
    ;
-
 
2400
    ; …᫨ ¯®¤å®¤ï饣® UIN ­¥â ¢ ª®­â ªâ-«¨áâ¥
-
 
2401
    ;
-
 
2402
   m_snac_ch1_notfound:
2333
    lea ebx, [ebx+ecx]
2403
    
2334
    lea eax, [ui.bUin]
2404
    lea eax, [ui.bUin]
2335
    movzx ecx, byte [ui.bUinLength]
2405
    movzx ecx, byte [ui.bUinLength]
Line -... Line 2406...
-
 
2406
    call strcpy
-
 
2407
 
-
 
2408
    ;
-
 
2409
    ; ‚뢮¤ á®®¡é¥­¨ï "®â ª®£®"
-
 
2410
    ;
2336
    call strcpy
2411
   m_snac_ch1_msgfrom:
Line 2337... Line 2412...
2337
 
2412
 
2338
    mov [ebx+ecx], byte 0
2413
    mov [ebx + ecx], byte 0
Line 2445... Line 2520...
2445
 
2520
 
Line 2446... Line 2521...
2446
    jmp m_fin
2521
    jmp m_fin
2447
 
2522
 
2448
 
2523
 
Line 2449... Line 2524...
2449
  m_snac_4_other:
2524
  m_snac_4_other:
Line 2465... Line 2540...
2465
    ;
2540
    ;
2466
  m_snac_9_3:
2541
  m_snac_9_3:
2467
    ;
2542
    ;
2468
    ; Ž¡à ¡®âª¨ ¯®ª  ­¥â
2543
    ; Ž¡à ¡®âª¨ ¯®ª  ­¥â
2469
    ;
2544
    ;
-
 
2545
    if USE_SSI <> 0
-
 
2546
 
-
 
2547
    ;
-
 
2548
    ; ‡ ¯à®á Š‹ á á¥à¢¥à 
-
 
2549
    ;
-
 
2550
 
-
 
2551
    ;
-
 
2552
    ; Request contact list (first time)
-
 
2553
    ;
-
 
2554
    mov [ssnac.wFid], 13h    ; Family
-
 
2555
    mov [ssnac.wSid], 04h    ; Subtype
-
 
2556
    mov [ssnac.dRi], 04h     ; request-id
-
 
2557
 
-
 
2558
    mov eax, ssnac
-
 
2559
    mov ebx, buff
-
 
2560
    xor edx, edx            
-
 
2561
    call sendsnac
-
 
2562
 
-
 
2563
 
-
 
2564
    else
Line 2470... Line 2565...
2470
 
2565
 
2471
 
2566
 
Line 2544... Line 2639...
2544
    call sendsnac
2639
    call sendsnac
Line 2545... Line 2640...
2545
 
2640
 
2546
    ;
2641
    ;
2547
    ; ‚ &RQ …áâì ¯ ª¥â ãáâ ­®¢ª¨ à §à¥è¥­¨©. ï ¨á¯®«ì§ãî ¥£® ¡¥§ ¨§¬¥­¥­¨ï
2642
    ; ‚ &RQ …áâì ¯ ª¥â ãáâ ­®¢ª¨ à §à¥è¥­¨©. ï ¨á¯®«ì§ãî ¥£® ¡¥§ ¨§¬¥­¥­¨ï
2548
    ;  â.ª. ­¥ §­ î, çâ® ®­ ᮤ¥à¦¨â
-
 
-
 
2643
    ;  â.ª. ­¥ §­ î, çâ® ®­ ᮤ¥à¦¨â
Line 2549... Line 2644...
2549
    ;
2644
    ; - ¢®§¬®¦­®, ¡ã¤ã ¨á¯®«ì§®¢ âì ¯®§¤­¥¥
2550
 
2645
 
2551
    mov [ssnac.wFid], 15  ; Family
2646
    ;mov [ssnac.wFid], 15  ; Family
2552
    mov [ssnac.wSid], 2    ; Subtype
-
 
2553
    mov [ssnac.dRi], 2
-
 
2554
 
-
 
2555
    mov word [buff], 0100h   ; 00 01 encapsulated META_DATA
-
 
2556
    mov word [buff+2], 1000h ; 00 10     Len
-
 
2557
    mov word [buff+4], 000Eh ;  LE Len
-
 
2558
    mov word [buff+10], 07D0h ; META_DATA_REQ
-
 
2559
 
-
 
2560
 
-
 
2561
    mov eax, UIN
-
 
Line -... Line 2647...
-
 
2647
    ;mov [ssnac.wSid], 2    ; Subtype
-
 
2648
    ;mov [ssnac.dRi], 2
-
 
2649
 
-
 
2650
    ;mov word [buff], 0100h   ; 00 01 encapsulated META_DATA
-
 
2651
    ;mov word [buff+2], 1000h ; 00 10     Len
-
 
2652
    ;mov word [buff+4], 000Eh ;  LE Len
-
 
2653
    ;mov word [buff+10], 07D0h ; META_DATA_REQ
-
 
2654
 
-
 
2655
 
-
 
2656
    ;mov eax, UIN
2562
    call ascitoint
2657
    ;call ascitoint
2563
    mov dword [buff+6], eax
2658
    ;mov dword [buff+6], eax
2564
 
2659
 
2565
    mov word [buff+12], 0102h	; request sequence number (incrementing)
2660
    ;mov word [buff+12], 0102h   ; request sequence number (incrementing)
2566
    mov word [buff+14], 0424h	; META_SET_PERMS_USERINFO
2661
    ;mov word [buff+14], 0424h   ; META_SET_PERMS_USERINFO
2567
    mov [buff+16], 1		; authorization (1-required, 0-not required)
2662
    ;mov [buff+16], 1            ; authorization (1-required, 0-not required)
Line 2568... Line 2663...
2568
    mov [buff+17], byte 0	; webaware (0-no, 1-yes)
2663
    ;mov [buff+17], byte 0       ; webaware (0-no, 1-yes)
2569
    mov [buff+18], 1		 ; dc_perms (0-any, 1-contact, 2-authorization)
2664
    ;mov [buff+18], 1             ; dc_perms (0-any, 1-contact, 2-authorization)
2570
    mov [buff+19], 0		;unknown
2665
    ;mov [buff+19], 0            ;unknown
Line 2571... Line 2666...
2571
 
2666
 
2572
    mov eax, ssnac
2667
    ;mov eax, ssnac
2573
    mov ebx, buff
2668
    ;mov ebx, buff
Line 2602... Line 2697...
2602
    mov [ssnac.dRi], 2	   ; request-id
2697
    mov [ssnac.dRi], 2     ; request-id
Line 2603... Line 2698...
2603
 
2698
 
2604
    mov word [buff], 0100h	;  TLV type 01
2699
    mov word [buff], 0100h      ;  TLV type 01
2605
    mov word [buff+2], 0A00h	;  00 0a „«¨­ 
2700
    mov word [buff+2], 0A00h    ;  00 0a „«¨­ 
2606
    mov word [buff+4], 0008h	;  08 00
2701
    mov word [buff+4], 0008h    ;  08 00
2607
    mov eax, UIN
2702
    lea eax, [vtable + vartable.uin]
2608
    call ascitoint
2703
    call ascitoint
Line 2609... Line 2704...
2609
    mov dword [buff+6], eax
2704
    mov dword [buff+6], eax
2610
 
2705
 
Line 2611... Line 2706...
2611
    mov [buff+10],  003Ch ; 3C 00 - ‡ ¯à®á ­  ®ää« ©­®¢ë¥ á®®¡é¥­¨ï
2706
    mov word [buff+10],  003Ch ; 3C 00 - ‡ ¯à®á ­  ®ää« ©­®¢ë¥ á®®¡é¥­¨ï
Line 2612... Line 2707...
2612
    mov [buff+12],  0002  ; 02 00 - request sequence number
2707
    mov word [buff+12],  0002  ; 02 00 - request sequence number
2613
   
2708
   
Line 2626... Line 2721...
2626
    ;
2721
    ;
2627
    ; § ¢¥à襭® ᮥ¤¨­¥­¨¥
2722
    ; § ¢¥à襭® ᮥ¤¨­¥­¨¥
2628
    ;
2723
    ;
2629
    mov [login], 2
2724
    mov [login], 2
Line -... Line 2725...
-
 
2725
 
-
 
2726
 
-
 
2727
    end if   ; USE_SSI = 0
2630
 
2728
 
Line 2631... Line 2729...
2631
    jmp m_fin
2729
    jmp m_fin
2632
 
2730
 
2633
  m_snac_9_other:
2731
  m_snac_9_other:
Line 2634... Line 2732...
2634
    write_debug 'Unknown SNAC Family 9 Received'
2732
    write_debug 'Unknown SNAC Family 9 Recived'
2635
    jmp m_fin
2733
    jmp m_fin
2636
 
2734
 
2637
 
2735
 
2638
    ;
2736
    ;
2639
    ; FAMILY 13
2737
    ; FAMILY 13
-
 
2738
    ;
-
 
2739
  m_snac_13:
2640
    ;
2740
    cmp dx, 3
2641
  m_snac_13:
2741
    jz m_snac_13_3
Line 2642... Line 2742...
2642
    cmp dx, 3
2742
    cmp dx, 6
Line 2659... Line 2759...
2659
    ;
2759
    ;
2660
    mov [ssnac.wFid], 13h  ; Family
2760
    mov [ssnac.wFid], 13h  ; Family
2661
    mov [ssnac.wSid], 5    ; Subtype
2761
    mov [ssnac.wSid], 5    ; Subtype
2662
    mov [ssnac.dRi], 5	   ; request-id
2762
    mov [ssnac.dRi], 5     ; request-id
2663
    mov eax, ssnac
2763
    mov eax, ssnac
-
 
2764
    ;
-
 
2765
    ; 
2664
    ;  3D E7 48 17
2766
    ;
2665
    mov [buff], 03Dh	  ;
2767
    mov [buff], 03Dh      ;
2666
    mov [buff+1], 0E7h	  ;     modification date/time of client local SSI copy
2768
    mov [buff+1], 0E7h    ;   	modification date/time of client local SSI copy
2667
    mov [buff+2], 48h	  ;
2769
    mov [buff+2], 48h     ;
2668
    mov [buff+3], 17h	  ;
2770
    mov [buff+3], 17h     ;
-
 
2771
    ;
2669
    ; 00 10
2772
    ;
2670
    mov [buff+4], 00	  ;
2773
    mov [buff+4], 00      ;
2671
    mov [buff+5], 10h	  ;     number of items in client local SSI copy
2774
    mov [buff+5], 00h     ;  	number of items in client local SSI copy
Line 2672... Line 2775...
2672
    
2775
    
2673
    mov ebx, buff
2776
    mov ebx, buff
2674
    mov edx, 5
2777
    mov edx, 5
Line 2675... Line 2778...
2675
    call sendsnac
2778
    call sendsnac
Line -... Line 2779...
-
 
2779
 
-
 
2780
    jmp m_fin
-
 
2781
 
-
 
2782
 
-
 
2783
    ;
-
 
2784
    ; Server contact list reply
-
 
2785
    ;
-
 
2786
  m_snac_13_6:
-
 
2787
 
-
 
2788
    lea eax, [mbuff+10]     ; ‚ eax § £à㦠¥¬  ¤à¥á ¯à¨¥¬­®£® ¡ãä¥à + à §¬¥à § £®«®¢ª  snac
-
 
2789
 
-
 
2790
    call ssi_process_data   ; Ž¡à ¡®âª  ¯ ª¥â  á Š‹
-
 
2791
 
-
 
2792
    ;
-
 
2793
    ; €ªâ¨¢¨à㥬 SSI
-
 
2794
    ;
-
 
2795
 
-
 
2796
    mov [ssnac.wFid], 13h  ; Family
-
 
2797
    mov [ssnac.wSid], 7    ; Subtype
-
 
2798
    mov [ssnac.dRi], 7     ; request-id
-
 
2799
    mov eax, ssnac
-
 
2800
    mov ebx, buff
-
 
2801
    xor edx, edx
-
 
2802
    call sendsnac
-
 
2803
 
-
 
2804
 
-
 
2805
    ;
-
 
2806
    ; ¯®á«¥¤­ïï áâ ¤¨ï ᮥ¤¨­¥­¨ï
-
 
2807
    ;
-
 
2808
 
-
 
2809
    ;
-
 
2810
    ; ‡ ¯à è¨¢ ¥¬ á¢®î ¨­ä®à¬ æ¨î
-
 
2811
    ;
-
 
2812
    mov [ssnac.wFid], 1  ; Family
-
 
2813
    mov [ssnac.wSid], 0Eh    ; Subtype
-
 
2814
    mov [ssnac.dRi], 0Eh     ; request-id
-
 
2815
 
-
 
2816
    mov eax, ssnac
-
 
2817
    mov ebx, buff
-
 
2818
    xor edx, edx             ; TLV head len
-
 
2819
    call sendsnac
-
 
2820
 
-
 
2821
 
-
 
2822
    ;
-
 
2823
    ; Client sends its DC info and status to server
-
 
2824
    ;
-
 
2825
    mov [ssnac.wFid], 1  ; Family
-
 
2826
    mov [ssnac.wSid], 1Eh    ; Subtype
-
 
2827
    mov [ssnac.dRi], 1Eh     ; request-id
-
 
2828
 
-
 
2829
    mov [buff], 0           ;  TLV type 06
-
 
2830
    mov [buff+1], 6h        ;
-
 
2831
    mov [buff+2], 0         ;  TLV data length
-
 
2832
    mov [buff+3], 4         ;
-
 
2833
    ;
-
 
2834
    ;
-
 
2835
    mov ax, STATUS_DCDISABLED  ; DC disabled
-
 
2836
    call htons
-
 
2837
    mov word [buff+4], ax
-
 
2838
    mov ax, STATUS_ONLINE
-
 
2839
    mov [status], ax
-
 
2840
    mov word [buff+6], ax
-
 
2841
 
-
 
2842
    mov eax, ssnac
-
 
2843
    mov ebx, buff
-
 
2844
    mov edx, 8           ; TLV head len+ data len
-
 
2845
    call sendsnac
-
 
2846
 
-
 
2847
 
-
 
2848
    ;
-
 
2849
    ;  ‚ë£à㦠¥¬ ­  á¥à¢¥à Š‹
-
 
2850
    ;   FIXME ‚®§¬®¦­®, §¤¥áì ­¥ ­ã¦­  íâ  äã­ªæ¨ï
-
 
2851
    ;call uploadkl
-
 
2852
 
-
 
2853
    ;
-
 
2854
    ; ‚ë£à㦠¥¬ ¨­¢¨§¨¡« «¨áâ, ¯®ª  ¯ãá⮩
-
 
2855
    ;
-
 
2856
    ;mov [ssnac.wFid], 9  ; Family
-
 
2857
    ;mov [ssnac.wSid], 7    ; Subtype
-
 
2858
    ;mov [ssnac.dRi], 7
-
 
2859
 
-
 
2860
    ;mov eax, ssnac
-
 
2861
    ;mov ebx, buff
-
 
2862
    ;xor edx, edx
-
 
2863
    ;call sendsnac
-
 
2864
 
-
 
2865
    ;
-
 
2866
    ; ‚ &RQ …áâì ¯ ª¥â ãáâ ­®¢ª¨ à §à¥è¥­¨©. ï ¨á¯®«ì§ãî ¥£® ¡¥§ ¨§¬¥­¥­¨ï
-
 
2867
    ;  â.ª. ­¥ §­ î, çâ® ®­ ᮤ¥à¦¨â
-
 
2868
    ; - ¢®§¬®¦­®, ¡ã¤ã ¨á¯®«ì§®¢ âì ¯®§¤­¥¥
-
 
2869
 
-
 
2870
    ;mov [ssnac.wFid], 15  ; Family
-
 
2871
    ;mov [ssnac.wSid], 2    ; Subtype
-
 
2872
    ;mov [ssnac.dRi], 2
-
 
2873
 
-
 
2874
    ;mov word [buff], 0100h   ; 00 01 encapsulated META_DATA
-
 
2875
    ;mov word [buff+2], 1000h ; 00 10     Len
-
 
2876
    ;mov word [buff+4], 000Eh ;  LE Len
-
 
2877
    ;mov word [buff+10], 07D0h ; META_DATA_REQ
-
 
2878
 
-
 
2879
 
-
 
2880
    ;mov eax, UIN
-
 
2881
    ;call ascitoint
-
 
2882
    ;mov dword [buff+6], eax
-
 
2883
 
-
 
2884
    ;mov word [buff+12], 0102h   ; request sequence number (incrementing)
-
 
2885
    ;mov word [buff+14], 0424h   ; META_SET_PERMS_USERINFO
-
 
2886
    ;mov [buff+16], 1            ; authorization (1-required, 0-not required)
-
 
2887
    ;mov [buff+17], byte 0       ; webaware (0-no, 1-yes)
-
 
2888
    ;mov [buff+18], 1             ; dc_perms (0-any, 1-contact, 2-authorization)
-
 
2889
    ;mov [buff+19], 0            ;unknown
-
 
2890
 
-
 
2891
    ;mov eax, ssnac
-
 
2892
    ;mov ebx, buff
-
 
2893
    ;mov edx, 20
-
 
2894
 
-
 
2895
 
-
 
2896
    ;
-
 
2897
    ; Client READY command
-
 
2898
    ;
-
 
2899
    mov [ssnac.wFid], 1  ; Family
-
 
2900
    mov [ssnac.wSid], 2    ; Subtype
-
 
2901
    mov [ssnac.dRi], 2     ; request-id
-
 
2902
 
-
 
2903
    mov eax, FAMILY_ARR
-
 
2904
    mov ebx, buff
-
 
2905
    push ecx
-
 
2906
    mov ecx, FA_LEN
-
 
2907
    call strcpy
-
 
2908
    pop ecx
-
 
2909
 
-
 
2910
    mov eax, ssnac
-
 
2911
    mov ebx, buff
-
 
2912
    mov edx, FA_LEN
-
 
2913
    call sendsnac
-
 
2914
 
-
 
2915
 
-
 
2916
    ;
-
 
2917
    ; ‡ ¯à è¨¢ ¥¬ offline á®®¡é¥­¨ï
-
 
2918
    ;
-
 
2919
    mov [ssnac.wFid], 15h  ; Family
-
 
2920
    mov [ssnac.wSid], 2    ; Subtype
-
 
2921
    mov [ssnac.dRi], 2     ; request-id
-
 
2922
 
-
 
2923
    mov word [buff], 0100h      ;  TLV type 01
-
 
2924
    mov word [buff+2], 0A00h    ;  00 0a „«¨­ 
-
 
2925
    mov word [buff+4], 0008h    ;  08 00
-
 
2926
    lea eax, [vtable + vartable.uin]
-
 
2927
    call ascitoint
-
 
2928
    mov dword [buff+6], eax
-
 
2929
 
-
 
2930
    mov word [buff+10],  003Ch ; 3C 00 - ‡ ¯à®á ­  ®ää« ©­®¢ë¥ á®®¡é¥­¨ï
-
 
2931
    mov word [buff+12],  0002  ; 02 00 - request sequence number
-
 
2932
   
-
 
2933
    mov edx, 14        ; Ž¡é¨© à §¬¥à ¤ ­­ëå ¢ ¡ãä¥à¥
-
 
2934
 
-
 
2935
    mov eax, ssnac
-
 
2936
    mov ebx, buff
-
 
2937
    call sendsnac
-
 
2938
 
-
 
2939
    
-
 
2940
 
-
 
2941
    ;
-
 
2942
    ; ‡ ¯à è¨¢ ¥¬ ¨­ä®à¬ æ¨î ¢á¥å UIN
-
 
2943
    ; FIXME ‚®§¬®¦­®, §¤¥áì ­¥ ­ã¦­  íâ  äã­ªæ¨ï
-
 
2944
    ;call getinfo
-
 
2945
    ;
-
 
2946
    ; § ¢¥à襭® ᮥ¤¨­¥­¨¥
-
 
2947
    ;
-
 
2948
    mov [login], 2
-
 
2949
 
-
 
2950
 
-
 
2951
    jmp m_fin
-
 
2952
 
2676
 
2953
 
2677
    jmp m_fin
2954
 
2678
 
2955
 
2679
    ;
2956
    ;
2680
    ;  Server tell client its local copy up-to-date
2957
    ;  Server tell client its local copy up-to-date
Line 2713... Line 2990...
2713
    ;
2990
    ;
2714
    ;
2991
    ;
2715
    mov ax, STATUS_DCDISABLED  ; DC disabled
2992
    mov ax, STATUS_DCDISABLED  ; DC disabled
2716
    call htons
2993
    call htons
2717
    mov word [buff+4], ax
2994
    mov word [buff+4], ax
-
 
2995
    ;
2718
    mov ax, STATUS_ONLINE
2996
    ; 
2719
    mov [status], ax
2997
    mov ax, [status]
2720
    mov word [buff+6], ax
2998
    mov word [buff+6], ax
Line 2721... Line 2999...
2721
 
2999
 
2722
    mov eax, ssnac
3000
    mov eax, ssnac
2723
    mov ebx, buff
3001
    mov ebx, buff
Line 2752... Line 3030...
2752
    mov [ssnac.dRi], 2	   ; request-id
3030
    mov [ssnac.dRi], 2     ; request-id
Line 2753... Line 3031...
2753
 
3031
 
2754
    mov word [buff], 0100h	;  TLV type 01
3032
    mov word [buff], 0100h      ;  TLV type 01
2755
    mov word [buff+2], 0A00h	;  00 0a „«¨­ 
3033
    mov word [buff+2], 0A00h    ;  00 0a „«¨­ 
2756
    mov word [buff+4], 0008h	;  08 00
3034
    mov word [buff+4], 0008h    ;  08 00
2757
    mov eax, UIN
3035
    lea eax, [vtable + vartable.uin]
2758
    call ascitoint
3036
    call ascitoint
Line 2759... Line 3037...
2759
    mov dword [buff+6], eax
3037
    mov dword [buff+6], eax
2760
 
3038
 
Line 2770... Line 3048...
2770
 
3048
 
Line 2771... Line 3049...
2771
 
3049
 
2772
    jmp m_fin
3050
    jmp m_fin
2773
 
3051
 
Line 2899... Line 3177...
2899
    mov [ssnac.dRi], 0602h     ; request-id
3177
    mov [ssnac.dRi], 0602h     ; request-id
Line 2900... Line 3178...
2900
 
3178
 
2901
    mov word [buff], 0100h     ;  00 01 TLV.Type(1) - encapsulated META_DATA1
3179
    mov word [buff], 0100h     ;  00 01	TLV.Type(1) - encapsulated META_DATA1
2902
    mov word [buff+2], 0A00h   ;  00 0A TLV.Length
3180
    mov word [buff+2], 0A00h   ;  00 0A	TLV.Length
2903
    mov word [buff+4], 0008h   ;  08 00 data chunk size (TLV.Length-2)
3181
    mov word [buff+4], 0008h   ;  08 00	data chunk size (TLV.Length-2)
2904
    mov eax, UIN
3182
    lea eax, [vtable + vartable.uin]
2905
    call ascitoint
3183
    call ascitoint
2906
    mov dword [buff+6], eax    ; xx xx xx xx (LE) client uin
3184
    mov dword [buff+6], eax    ; xx xx xx xx (LE) client uin
2907
    mov word [buff+10], 003Eh  ; 3E 00  (LE) data type: delete offline msgs request cmd
3185
    mov word [buff+10], 003Eh  ; 3E 00	(LE) data type: delete offline msgs request cmd
Line 2988... Line 3266...
2988
    jmp m_fin
3266
    jmp m_fin
Line 2989... Line 3267...
2989
    
3267
    
Line 2990... Line 3268...
2990
 
3268
 
Line 2991... Line 3269...
2991
  m_snac_15_other:
3269
  m_snac_15_other:
Line 2992... Line 3270...
2992
 
3270
 
2993
    write_debug 'Unknown SNAC Family 15 Received'
3271
    write_debug 'Unknown SNAC Family 15 Recived'
2994
 
3272
 
Line 2995... Line 3273...
2995
    jmp m_fin
3273
    jmp m_fin
Line 3128... Line 3406...
3128
    mov [ssnac.wSid], 6    ; Subtype
3406
    mov [ssnac.wSid], 6    ; Subtype
3129
    mov [ssnac.dRi], 106h     ; request-id
3407
    mov [ssnac.dRi], 106h     ; request-id
3130
    ;
3408
    ;
3131
    ;  ®«ãç ¥¬ ¢à¥¬ï á § ¯ã᪠ á¨á⥬ë, ¤«ï cookie
3409
    ;  ®«ãç ¥¬ ¢à¥¬ï á § ¯ã᪠ á¨á⥬ë, ¤«ï cookie
3132
    ;
3410
    ;
3133
    mov eax, 26
3411
    ;mov eax, 26
3134
    mov ebx, 9
3412
    ;mov ebx, 9
3135
    int 40h
3413
    ;int 40h
-
 
3414
    mcall 26, 9
Line 3136... Line 3415...
3136
 
3415
 
3137
    mov dword [buff], eax      ; Cookie 1
3416
    mov dword [buff], eax      ; Cookie 1
Line 3138... Line 3417...
3138
    mov dword [buff+4], eax    ; Cookie 2
3417
    mov dword [buff+4], eax    ; Cookie 2
Line 3229... Line 3508...
3229
    mov [ssnac.dRi], 702h     ; request-id
3508
    mov [ssnac.dRi], 702h     ; request-id
Line 3230... Line 3509...
3230
 
3509
 
3231
    mov word [buff], 0100h	   ;TLV.Type(1) - encapsulated META_DATA
3510
    mov word [buff], 0100h         ;TLV.Type(1) - encapsulated META_DATA
3232
    mov word [buff+2], 1000h	   ; 00 10  TLV.Length
3511
    mov word [buff+2], 1000h       ; 00 10  TLV.Length
3233
    mov word [buff+4], 000Eh	   ; (LE)               data chunk size (TLV.Length-2)
3512
    mov word [buff+4], 000Eh       ; (LE)	 	data chunk size (TLV.Length-2)
3234
    mov eax, UIN
3513
    lea eax, [vtable + vartable.uin]
3235
    call ascitoint
3514
    call ascitoint
3236
    mov dword [buff+6], eax	   ;(LE)                request owner uin
3515
    mov dword [buff+6], eax        ;(LE)	 	request owner uin
3237
    mov word [buff+10], 07D0h	   ;data type: META_DATA_REQ
3516
    mov word [buff+10], 07D0h      ;data type: META_DATA_REQ
3238
    ;mov word [buff+12], 0008h      ; request sequence number <<<-- Œ®¦¥â ¬¥­ïâìáï FIXIT
3517
    ;mov word [buff+12], 0008h      ; request sequence number <<<-- Œ®¦¥â ¬¥­ïâìáï FIXIT
Line 3355... Line 3634...
3355
  @@:
3634
  @@:
3356
    popad
3635
    popad
3357
    popf
3636
    popf
3358
  ret
3637
  ret
Line -... Line 3638...
-
 
3638
 
-
 
3639
;
-
 
3640
; ”ã­ªæ¨ï ¤«ï ãáâ ­®¢ª¨ áâ âãá 
-
 
3641
; áâ âãá ¢ ¯¥à¥¬¥­­®© status
-
 
3642
 setstatus:
-
 
3643
  push eax
-
 
3644
  push ebx
-
 
3645
  push edx
-
 
3646
    ;
-
 
3647
    ; Client sends its DC info and status to server
-
 
3648
    ;
-
 
3649
    mov [ssnac.wFid], 1  ; Family
-
 
3650
    mov [ssnac.wSid], 1Eh    ; Subtype
-
 
3651
    mov [ssnac.dRi], 1Eh     ; request-id
-
 
3652
 
-
 
3653
    mov [buff], 0           ;  TLV type 06
-
 
3654
    mov [buff+1], 6h        ;
-
 
3655
    mov [buff+2], 0         ;  TLV data length
-
 
3656
    mov [buff+3], 4         ;
-
 
3657
    ;
-
 
3658
    ;
-
 
3659
    mov ax, STATUS_DCDISABLED  ; DC disabled
-
 
3660
    call htons
-
 
3661
    mov word [buff+4], ax
-
 
3662
    ;
-
 
3663
    ;
-
 
3664
    mov ax, [status]
-
 
3665
    mov word [buff+6], ax
-
 
3666
 
-
 
3667
    mov eax, ssnac
-
 
3668
    mov ebx, buff
-
 
3669
    mov edx, 8           ; TLV head len+ data len
-
 
3670
    call sendsnac
-
 
3671
 
-
 
3672
  pop edx
-
 
3673
  pop ebx
-
 
3674
  pop eax
-
 
3675
 ret
-
 
3676
 
-
 
3677
 
-
 
3678
;
-
 
3679
; Œ ªà®á ¯à®¯ã᪠¥â ¢á¥ ¯à®¡¥«ë ¢ áâப¥ ¤® 
-
 
3680
; 1 £® §­ ç é¥£® ᨬ¢®« 
-
 
3681
; eax - 㪠§ â¥«ì ­  null-terminated áâபã
-
 
3682
 
-
 
3683
macro skip_spaces {
-
 
3684
  local ..sp_end, ..sp_loop
-
 
3685
 
-
 
3686
  push ebx
-
 
3687
  push ecx
-
 
3688
 
-
 
3689
  xor ebx, ebx
-
 
3690
  xor ecx, ecx
-
 
3691
 
-
 
3692
 ..sp_loop:
-
 
3693
 
-
 
3694
 
-
 
3695
  mov bl, [eax + ecx]
-
 
3696
  cmp bl, 0x20
-
 
3697
  jnz ..sp_end
-
 
3698
 
-
 
3699
 
-
 
3700
  inc ecx
-
 
3701
  jmp ..sp_loop
-
 
3702
 
-
 
3703
 
-
 
3704
 
-
 
3705
 ..sp_end:
-
 
3706
  lea eax, [eax + ecx]
-
 
3707
 
-
 
3708
  pop ecx
-
 
3709
  pop ebx
-
 
3710
}
-
 
3711
 
-
 
3712
 
-
 
3713
 
-
 
3714
 
-
 
3715
 
-
 
3716
;
-
 
3717
; Ž¡à ¡®âª  ª®¬ ­¤
-
 
3718
; ‚ ¥ax ¯¥à¥¤ ¥âáï 㪠§ â¥«ì ­  áâபã. Š®¬ ­¤  ¨  à£ã¬¥­âë à §¤¥«¥­ë ¯à®¡¥«®¬
-
 
3719
; ª®¬ ­¤  ­ ç¨­ ¥âáï á /
-
 
3720
; ¢ eax - १ã«ìâ â ¢ë¯®«­¥­¨ï ª®¬ ­¤ë, -1 ª®¬ ­¤  ­¥ áãé¥áâ¢ã¥â, 0 ®ª, ¤à㣨¥ § ¢¨áï⠮⠪®¬ ­¤ë
-
 
3721
 
-
 
3722
 cmd:
-
 
3723
   push ebx
-
 
3724
   push ecx
-
 
3725
   push edi
-
 
3726
   push esi
-
 
3727
 
-
 
3728
   ;
-
 
3729
   ; à®¢¥à¨âì ¯¥à¢ë© ᨬ¢®« 
-
 
3730
   ;
-
 
3731
   xor ebx, ebx
-
 
3732
   mov bl, [eax]
-
 
3733
   cmp bl, '/'
-
 
3734
   jnz cmd_end
-
 
3735
 
-
 
3736
   ;
-
 
3737
   ;  §¤¥«¥­¨¥ ¯® 1© ¡ãª¢¥ ª®¬ ­¤ë
-
 
3738
   ;
-
 
3739
   mov bl, [eax + 1]
-
 
3740
 
-
 
3741
   cmp bl, 'c'
-
 
3742
   jz cmd_c
-
 
3743
 
-
 
3744
   cmp bl, 'e'
-
 
3745
   jz cmd_e
-
 
3746
 
-
 
3747
   cmp bl, 's'
-
 
3748
   jz cmd_s
-
 
3749
 
-
 
3750
   jmp cmd_no
-
 
3751
 
-
 
3752
  cmd_c:
-
 
3753
 
-
 
3754
  cmd_e:
-
 
3755
 
-
 
3756
   lea ebx, [eax + 1]
-
 
3757
   strcmp ebx, str_exit, str_exit.len
-
 
3758
   jz cmd_exit
-
 
3759
 
-
 
3760
   jmp cmd_no
-
 
3761
 
-
 
3762
 
-
 
3763
 
-
 
3764
 
-
 
3765
  cmd_s:
-
 
3766
 
-
 
3767
   lea ebx, [eax + 1]
-
 
3768
   strcmp ebx, str_status, str_status.len
-
 
3769
   jz cmd_status
-
 
3770
  
-
 
3771
   jmp cmd_no
-
 
3772
 
-
 
3773
 
-
 
3774
 
-
 
3775
  cmd_exit:
-
 
3776
 
-
 
3777
 
-
 
3778
  cmd_status:
-
 
3779
   ;
-
 
3780
   ; ãáâ ­®¢¨âì áâ âãá ¨ ¯®á« âì ¯ ª¥â ᬥ­ë áâ âãá 
-
 
3781
   ;
-
 
3782
   lea eax, [eax + 1 + str_status.len]
-
 
3783
   skip_spaces
-
 
3784
 
-
 
3785
   strcmp eax, str_online, str_online.len
-
 
3786
   jz cmd_st_online
-
 
3787
 
-
 
3788
   strcmp eax, str_away, str_away.len
-
 
3789
   jz cmd_st_away
-
 
3790
 
-
 
3791
   strcmp eax, str_na, str_na.len
-
 
3792
   jz cmd_st_na
-
 
3793
 
-
 
3794
   strcmp eax, str_dnd, str_dnd.len
-
 
3795
   jz cmd_st_dnd
-
 
3796
 
-
 
3797
   strcmp eax, str_bisy, str_bisy.len
-
 
3798
   jz cmd_st_bisy
-
 
3799
 
-
 
3800
   strcmp eax, str_free4chat, str_free4chat.len
-
 
3801
   jz cmd_st_free4chat
-
 
3802
 
-
 
3803
   ;
-
 
3804
   ; ‘â âãá ­¥ ®¯à¥¤¥«¥­.
-
 
3805
   ; ‚뢥á⨠ᮮ¡é¥­¨¥  ® ¤®áâ㯭ëå áâ âãá å
-
 
3806
   ;
-
 
3807
   mov eax, str_status_message
-
 
3808
   xor ebx, ebx
-
 
3809
   call writemsg
-
 
3810
 
-
 
3811
   jmp cmd_end
-
 
3812
 
-
 
3813
 
-
 
3814
  cmd_st_online:
-
 
3815
 
-
 
3816
  cmd_st_away:
-
 
3817
 
-
 
3818
  cmd_st_na:
-
 
3819
 
-
 
3820
  cmd_st_dnd:
-
 
3821
 
-
 
3822
  cmd_st_bisy:
-
 
3823
 
-
 
3824
  cmd_st_free4chat:
-
 
3825
 
-
 
3826
 
-
 
3827
  cmd_no:
-
 
3828
 
-
 
3829
  cmd_end:
-
 
3830
   pop esi
-
 
3831
   pop edi
-
 
3832
   pop ecx
-
 
3833
   pop ebx
-
 
3834
 
-
 
3835
 ret
Line 3359... Line 3836...
3359
 
3836
 
3360
 
3837
 
3361
 
3838
 
3362
 
3839
 
3363
; <--- initialised data --->
3840
; <--- initialised data --->
-
 
3841
DATA
-
 
3842
include "parser_data.inc"
3364
DATA
3843
include "ssi_data.inc"
Line 3365... Line 3844...
3365
  lsz header,\
3844
include "comp_data.inc"
3366
    ru, "KI",\			  
3845
 
3367
    en, "KI",\
3846
 
Line 3368... Line 3847...
3368
    fr, "KI"
3847
head db 'KI',0
-
 
3848
 
-
 
3849
 
-
 
3850
;
-
 
3851
MESS db 'Message from ', 0
-
 
3852
CUSER db 'Current user: ', 0 
-
 
3853
 
-
 
3854
;
Line 3369... Line -...
3369
 
-
 
3370
 
-
 
3371
;
3855
; ‘¯¨á®ª IP á¥à¢¥à®¢ ICQ
3372
MESS db 'Message from ', 0
3856
 
3373
CUSER db 'Current user: ', 0 
3857
;205.188.153.121
3374
 
3858
;icq_ip db '64.12.200.089',0
3375
;
3859
;icq_ip db '64.12.161.185',0 
Line 3385... Line 3869...
3385
;
3869
;
3386
ui UI_head	       ; User info
3870
ui UI_head             ; User info
3387
;
3871
;
3388
procinfo process_information
3872
procinfo process_information
3389
;
3873
;
3390
UIN db '123456789',0
3874
;UIN db '362820484',0
3391
PASS db 'coolpass',0
3875
;PASS db 'test',0
3392
ID_STRING db 'ICQ Inc. - Product of ICQ (TM).2000b.4.65.1.3281.85',0
3876
ID_STRING db 'ICQ Inc. - Product of ICQ (TM).2000b.4.65.1.3281.85',0
3393
;ID_STRING db 'ICQ Inc. - Product of ICQ (TM).2001b.5.17.1.3642.85',0
3877
;ID_STRING db 'ICQ Inc. - Product of ICQ (TM).2001b.5.17.1.3642.85',0
-
 
3878
 
-
 
3879
 
3394
CAPABILITIES db 053h, 054h, 0, 0, 097h, 0B1h, 027h, 051h, 024h, 03Ch, 043h, 034h, 0ADh, 022h, 0D6h, 0ABh,\
3880
;CAPABILITIES db 0x09, 0x46, 0x13, 0x49, 0x4C, 0x7F, 0x11, 0xD1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00,\ 
3395
		0F7h, 03Fh, 014h, 092h, 02Eh, 07Ah, 064h, 075h, 0FAh, 0DFh, 04Dh, 0C8h, 088h, 06Fh, 0EAh, 035h,\ 
3881
                ;0x97, 0xB1, 0x27, 0x51, 0x24, 0x3C, 0x43, 0x34, 0xAD, 0x22, 0xD6, 0xAB, 0xF7, 0x3F, 0x14, 0x92,\ 
3396
		095h, 0FDh, 0B6h, 0DFh, 09h, 046h, 013h, 044h,	04Ch, 07Fh, 011h, 0D1h, 082h, 022h, 044h, 045h,\ 
3882
CAPABILITIES db 0x2E, 0x7A, 0x64, 0x75, 0xFA, 0xDF, 0x4D, 0xC8, 0x88, 0x6F, 0xEA, 0x35, 0x95, 0xFD, 0xB6, 0xDF,\
-
 
3883
                'KOLIBRI KI(cq)',0,0
-
 
3884
                ;0x09, 0x46, 0x13, 0x44, 0x4C, 0x7F, 0x11, 0xD1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00 
-
 
3885
 
-
 
3886
; 1 áâப 
-
 
3887
; {09461349-4C7F-11D1-8222-444553540000} 
-
 
3888
; Client supports channel 2 extended, TLV(0x2711) based messages. Currently used only by ICQ clients. 
-
 
3889
;ICQ clients and clones use this GUID as message format sign. Trillian client use another GUID 
-
 
3890
; in channel 2 messages to implement its own message format (trillian doesn't use TLV(x2711) in SecureIM channel 2 messages!).
-
 
3891
;
-
 
3892
; 2 áâப 
-
 
3893
; {97B12751-243C-4334-AD22-D6ABF73F1492}  
-
 
3894
; Client supports RTF messages. This capability currently used by ICQ service and ICQ clients.
-
 
3895
;
3397
		053h, 054h, 0, 0
3896
; 4 áâப 
-
 
3897
; {0946134E-4C7F-11D1-8222-444553540000} 
-
 
3898
; Client supports UTF-8 messages. This capability currently used by AIM service and AIM clients
-
 
3899
;
-
 
3900
 
-
 
3901
 
-
 
3902
 
-
 
3903
                                     
3398
;
3904
;
3399
; From &RQ
3905
; From &RQ
3400
;
3906
;
Line 3401... Line 3907...
3401
 
3907
 
Line 3405... Line 3911...
3405
;                0x53, 0x54, 0x00, 0x00, 0x09, 0x46, 0x00, 0x00, 0x4C, 0x7F, 0x11, 0xD1, 0x82, 0x22, 0x44, 0x45,\        ;ST...F..L.T‚"DE
3911
;                0x53, 0x54, 0x00, 0x00, 0x09, 0x46, 0x00, 0x00, 0x4C, 0x7F, 0x11, 0xD1, 0x82, 0x22, 0x44, 0x45,\        ;ST...F..L.T‚"DE
3406
;                0x53, 0x54, 0x00, 0x00, 0x26, 0x52, 0x51, 0x69, 0x6E, 0x73, 0x69, 0x64, 0x65, 0x02, 0x07, 0x09,\        ;ST..&RQinside...
3912
;                0x53, 0x54, 0x00, 0x00, 0x26, 0x52, 0x51, 0x69, 0x6E, 0x73, 0x69, 0x64, 0x65, 0x02, 0x07, 0x09,\        ;ST..&RQinside...
3407
;                0x00, 0x00, 0x00, 0x00                                         
3913
;                0x00, 0x00, 0x00, 0x00                                         
Line 3408... Line 3914...
3408
 
3914
 
3409
 
3915
 
3410
C_LEN = 40h
3916
C_LEN = 32
3411
;C_LEN = 80
3917
;C_LEN = 80
Line 3420... Line 3926...
3420
	       0x00, 0x02, 0x00, 0x01, 0x01, 0x01, 0x04, 0x7B,	0x00, 0x03, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,\    
3926
               0x00, 0x02, 0x00, 0x01, 0x01, 0x01, 0x04, 0x7B,  0x00, 0x03, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,\    
3421
	       0x00, 0x15, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,	0x00, 0x04, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,\    
3927
               0x00, 0x15, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,  0x00, 0x04, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,\    
3422
	       0x00, 0x06, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,	0x00, 0x09, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,\    
3928
               0x00, 0x06, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,  0x00, 0x09, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,\    
3423
	       0x00, 0x0A, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,	0x00, 0x10, 0x00, 0x01, 0x00, 0x10, 0x06, 0x6A	  
3929
               0x00, 0x0A, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,  0x00, 0x10, 0x00, 0x01, 0x00, 0x10, 0x06, 0x6A    
Line 3424... Line 3930...
3424
 
3930
 
3425
 
3931
;
3426
 
3932
;
Line 3427... Line 3933...
3427
 
3933
; 
-
 
3934
 
3428
 
3935
FA_LEN = 50h
3429
FA_LEN = 50h
3936
;
3430
 
3937
;
3431
;
3938
;
3432
ID_NUM = 010Ah
3939
ID_NUM = 010Ah
3433
MAJOR = 05h
3940
MAJOR = 05h
3434
;MAJOR = 04h
3941
;MAJOR = 04h
3435
;MINOR = 041h
3942
;MINOR = 041h
3436
MINOR = 011h
3943
MINOR = 011h
3437
LESSER = 01h
3944
LESSER = 01h
3438
;BUILD = 0CD1h
3945
;BUILD = 0CD1h
-
 
3946
BUILD = 0E3Ah
-
 
3947
DISTR = 055h
-
 
3948
;
3439
BUILD = 0E3Ah
3949
;
3440
DISTR = 055h
3950
 
3441
TCB_ESTABLISHED = 4
3951
TCB_ESTABLISHED = 4
3442
TCB_CLOSED = 11
3952
TCB_CLOSED = 11
3443
;
3953
;
Line 3444... Line 3954...
3444
CL_LANG db 'en',0
3954
CL_LANG db 'en',0
Line -... Line 3955...
-
 
3955
CL_COUNTRY db 'us',0
-
 
3956
 
3445
CL_COUNTRY db 'us',0
3957
 
3446
 
3958
sbuff db 1024 dup 0     ; ãä¥à ¤«ï ¯¥à¥¤ ç¨ ¨á¯®«ì§ã¥âáï ¢­ãâਠsendflap
3447
 
3959
 
3448
sbuff db 1024 dup 0	; ãä¥à ¤«ï ¯¥à¥¤ ç¨ ¨á¯®«ì§ã¥âáï ¢­ãâਠsendflap
3960
;recived db 0              ; à¨­ïâ® ¤ ­­ëå ¨§ ⥫  ¯ ª¥â 
3449
 
3961
 
3450
rbuff db 1024 dup 0	; à¨¥¬­ë© ¡ãä¥à
3962
;rbuff db 1024 dup 0     ; à¨¥¬­ë© ¡ãä¥à
Line 3474... Line 3986...
3474
 
3986
 
Line 3475... Line 3987...
3475
 
3987
 
-
 
3988
timer dw 0
-
 
3989
 
-
 
3990
;ltest db "ADMIN",0
-
 
3991
buff db 1024 dup 0
-
 
3992
;  lbuff db 8 dup 0 	 ; „«ï 1 ¯ ª¥â  ®â á¥à¢¥à 
-
 
3993
 
-
 
3994
;
-
 
3995
; ‘âப¨ ª®¬ ­¤ ¤«ï áà ¢­¥­¨ï
-
 
3996
;
-
 
3997
str_status db 'status '
-
 
3998
str_status.len = $ - str_status
-
 
3999
str_exit db 'exit '
-
 
4000
str_exit.len = $ - str_exit
-
 
4001
;
-
 
4002
; ‘âப¨ áâ âãᮢ ¤«ï áà ¢­¥­¨ï
-
 
4003
;
-
 
4004
str_away db 'away'
-
 
4005
str_away.len = $ - str_away
-
 
4006
 
-
 
4007
str_dnd db 'dnd'
-
 
4008
str_dnd.len = $ - str_dnd
-
 
4009
 
-
 
4010
str_bisy db 'bisy'
-
 
4011
str_bisy.len = $ - str_bisy
-
 
4012
 
-
 
4013
str_na db 'na'
-
 
4014
str_na.len = $ - str_na
-
 
4015
 
-
 
4016
str_online db 'online'
-
 
4017
str_online.len = $ - str_online
-
 
4018
 
-
 
4019
str_free4chat db 'free4chat'
-
 
4020
str_free4chat.len = $ - str_free4chat
-
 
4021
 
-
 
4022
str_status_message db '„®áâã¯­ë¥ áâ âãáë: away, bisy, na, dnd, online, free4chat',0
-
 
4023
 
-
 
4024
 
Line -... Line 4025...
-
 
4025
;
Line 3476... Line 4026...
3476
timer dw 0
4026
;
3477
 
4027
;
3478
;ltest db "ADMIN",0
4028