1,29 → 1,37 |
; <--- description ---> |
; compiler: FASM 1.67.21 |
; name: ICQ for Kolibri |
; version: 0.01 |
; name: ICQ client for Kolibri |
; version: 0.1.30 |
; written by: LV |
; e-mail: lv4evil@ya.ru |
; e-mail: lv4evil@yandex.ru |
|
|
; <--- include all MeOS stuff ---> |
include "lang.inc" |
include "../../../macros.inc" |
purge mov |
include "MACROS.INC" |
;purge mov |
;include "ASCL9/ascl.inc" |
;include "debug.inc" |
include "EDITBOX.INC" |
include "editbox.inc" |
|
; <--- start of MenuetOS application ---> |
MEOS_APP_START |
|
;include "debug.inc" |
include "2000.inc" |
include "comp.inc" |
;include "fsio.inc" |
include "dos2win.inc" |
include "parser.inc" |
include "ssi.inc" |
|
use_edit_box procinfo,22,5 |
|
; <--- start of code ---> |
; |
;
᫨ == 0, ª®¤ ¤«ï ¨á¯®«ì§®¢ ¨ï ª®â ªâ «¨áâ |
; á¥à¢¥à¥ ¥ áᥬ¡«¨àã¥âáï |
; |
USE_SSI = 1 |
; |
; |
|
CODE |
|
|
31,15 → 39,33 |
;mov ebx, 47h |
;int 40h |
|
call loaduin |
; |
; £à㧪 ª®ä¨£®¢ |
; |
|
mov eax, fname |
call parseconf |
; |
; 뢮¤ § £à㦥®© ¨ä®à¬ 樨 |
; |
|
mov eax, cfg_message |
xor ebx, ebx |
call writemsg |
|
call showcfg |
|
|
;call loaduin |
call draw_window ; at first create and draw the window |
|
;call buttonbox |
|
wait_event: ; main cycle |
mov eax, 23 |
mov ebx, 20 |
int 0x40 |
;mov eax, 23 |
;mov ebx, 20 |
;int 0x40 |
mcall 23,20 |
|
cmp eax, 1 ; if event == 1 |
je redraw ; jump to redraw handler |
51,12 → 77,8 |
; |
; ¤¥¬ ¤ ëå |
; |
mov eax, 53 |
mov ebx, 2 |
push ecx |
mov ecx, [socket] |
int 0x40 |
pop ecx |
|
mcall 53,2,[socket] |
cmp eax, 0 |
jnz read_socket |
|
63,8 → 85,8 |
mouse_edit_box inputbox |
; |
;
᫨ ¥áâì ᮥ¤¨¥¨¥ á á¥à¢¥à®¬, ¯®áë« ¥¬ ¯ ª¥âë - ¯®¤â¢¥¦¤¥¨ï ª ¦¤ë¥ 60 á |
; |
call sendkeep |
; ¥ âॡã¥âáï |
; call sendkeep |
|
jmp wait_event ; else return to the start of main cycle |
|
74,10 → 96,10 |
jmp wait_event |
|
|
key: ; key event handler |
mov eax, 2 ; get key code |
int 0x40 |
key: ; get key code |
|
mcall 2 |
|
cmp ah, 0Dh ; ஡¥« - ®â¯à ¢¨âì á®®¡é¥¨¥ |
jz send |
|
88,8 → 110,9 |
|
|
button: ; button event handler |
mov eax, 17 ; get button identifier |
int 0x40 |
;mov eax, 17 ; get button identifier |
;int 0x40 |
mcall 17 |
|
cmp ah, 2 |
jz connect |
131,6 → 154,12 |
mov [buff+ecx], ' ' ; ஡¥« |
lea ebx, [buff+ecx+1] |
mov ecx, NAME_LEN |
;debug |
push ebx |
mov ebx, NAME_LEN |
call print_mem |
pop ebx |
; |
call strcpy |
mov eax, buff |
xor ebx, ebx |
143,30 → 172,16 |
cmp ah, 1 |
jne wait_event ; return if button id != 1 |
|
or eax, -1 ; exit application |
int 0x40 |
; exit application |
mcall -1 |
|
|
draw_window: |
mov eax, 12 ; start drawing |
mov ebx, 1 |
int 0x40 |
; start drawing |
mcall 12,1 |
|
mov eax, 0 ; create and draw the window |
mov ebx, 100*65536+700 ; (window_cx)*65536+(window_sx) |
mov ecx, 100*65536+500 ; (window_cy)*65536+(window_sy) |
mov edx, 0x03ffffff ; work area color & window type 3 |
; mov esi, 0 ; grab color (not used) |
; mov edi, 0 ; frame color (not used) |
int 0x40 |
mcall 0,(100*65536+700),(100*65536+500),0x14ffffff,0,head |
|
mov eax, 4 ; window header |
mov ebx, 8*65536+8 ; coordinates |
mov ecx, 0x10ffffff ; color & font N1 |
mov edx, header ; address of text |
mov esi, header.size ; length of text |
int 0x40 |
|
draw_edit_box inputbox |
|
rect 10, 30, 500, 450, 0 |
178,11 → 193,21 |
call printbuff |
call buttonbox |
|
; |
; Image |
; |
;mov eax, 7 |
;mov ebx, redicq |
;mov ecx, 15*65536+15 |
;mov edx, 100*65536+100 |
;int 40h |
|
mov eax, 12 ; finish drawing |
mov ebx, 2 |
int 0x40 |
|
|
|
; finish drawing |
mcall 12,2 |
|
ret |
|
; |
189,12 → 214,17 |
; ®¥¤¨¥¨¥ |
; |
connect: |
mov eax, ICQ_IP |
lea eax, [vtable + vartable.icqip] |
call ip_parser |
call htonl |
data_debug 'IP:', eax |
|
;mov eax, ICQ_IP |
mov ebx, ICQ_PORT |
call srv_connect |
;call srv_login |
|
|
|
jmp wait_event |
|
|
306,11 → 336,12 |
cmp [hrf], 1 |
jz rs_head_recived |
|
|
mov eax, 53 |
mov ebx, 2 |
mov ecx, [socket] |
int 40h |
rs_check_sock: |
;mov eax, 53 |
;mov ebx, 2 |
;mov ecx, [socket] |
;int 40h |
mcall 53,2,[socket] |
cmp eax, 6 ; Flap head size |
jc r_end |
; |
320,11 → 351,11 |
|
;mov ecx, [socket] |
rs_loop: |
mov eax, 53 |
mov ebx, 3 |
;mov eax, 53 |
;mov ebx, 3 |
;int 40h |
mcall 53,3,[socket] |
|
int 40h |
|
mov [mbuff+edx], bl |
inc edx |
cmp edx, 6 |
365,10 → 396,12 |
; |
rs_head_recived: |
|
mov eax, 53 |
mov ebx, 2 |
;mov eax, 53 |
;mov ebx, 2 |
;mov ecx, [socket] |
int 40h |
;int 40h |
mcall 53,2,[socket] |
|
cmp ax, [rflap.wDs] ; §¬¥à ¤ ëå |
jc r_end |
; |
390,9 → 423,10 |
cmp edx, esi |
jz rs_data_end |
|
mov eax, 53 |
mov ebx, 3 |
int 40h |
;mov eax, 53 |
;mov ebx, 3 |
;int 40h |
mcall 53,3,[socket] |
mov [mbuff+edx], bl |
inc edx |
jmp rs_data_loop |
402,7 → 436,7 |
; |
rs_data_end: |
mov [hrf], 0 |
write_debug 'Some data received' |
;write_debug 'Some data recived' |
; |
; |
; |
409,13 → 443,18 |
cmp [login], 0 |
jz rs_login |
call main_loop |
jmp r_end |
; |
;
áâì á¬ëá« ¯à®¢¥à¨âì ᮪¥â «¨ç¨¥ á«¥¤ãî饣® § £®«®¢ª |
; |
;jmp r_end |
jmp rs_check_sock |
|
|
rs_login: |
call srv_login |
;write_debug 'Exited srv_login' |
jmp r_end |
;jmp r_end |
jmp rs_check_sock |
|
rs_flap_error: |
write_debug 'Invalid Flap' |
432,10 → 471,10 |
; |
rs_big_flap: |
|
write_debug 'Too BIG FLAP Received' |
write_debug 'Too BIG FLAP Recived' |
mov [hrf], 0 |
|
mov ecx, [socket] |
;mov ecx, [socket] |
mov ax, [rflap.wDs] |
xor esi, esi |
mov esi, eax |
445,9 → 484,10 |
cmp edx, esi |
jz r_end |
|
mov eax, 53 |
mov ebx, 3 |
int 40h |
;mov eax, 53 |
;mov ebx, 3 |
;int 40h |
mcall 53,3,[socket] |
;mov [mbuff+edx], bl |
inc edx |
jmp rs_data_loop2 |
479,57 → 519,70 |
getlp: |
inc ecx |
push ecx |
mov eax, 53 |
mov ebx, 9 |
int 0x40 |
;mov eax, 53 |
;mov ebx, 9 |
;int 0x40 |
mcall 53,9,ecx |
pop ecx |
cmp eax, 0 ; íâ®â «®ª «ìë© ¯®à⠨ᯮ«ì§ã¥âáï? |
jz getlp ; ¤ - ¯à®¤®«¦ ¥¬ ¯¥à¥¡¨à âì |
;OK ecx = port number |
;Open Socket |
mov eax, 53 |
mov ebx, 5 |
;mov eax, 53 |
;mov ebx, 5 |
xor edx, edx |
;mov dx, ICQ_PORT |
pop edx |
;mov esi,ICQ_IP |
mov edi, 1;SOCKET_ACTIVE |
;mov edi, 1;SOCKET_ACTIVE |
|
int 040h |
;int 40h |
mcall 53, 5, ecx, edx, esi, 1 |
; |
mov [socket], eax |
|
; |
; ¤¥¬ ãáâ ®¢ª¨ ᮥ¤¨¥¨ï |
mov ecx, eax |
srv_loop: |
|
mov eax, 53 |
mov ebx, 6 |
int 40h |
;mov eax, 5 |
;mov ebx, 50 |
;int 40h |
mcall 5, 50 |
|
|
|
;mov eax, 53 |
;mov ebx, 6 |
;int 40h |
mcall 53, 6, ecx |
cmp eax, TCB_ESTABLISHED |
jz fin |
cmp eax, 11 |
jae @f |
jae c_end |
; |
mov eax, 5 |
mov ebx, 50 |
int 40h |
|
;inc [timer] |
;cmp [timer], 50 |
;jz srv_err |
jmp srv_loop |
|
|
|
|
;srv_err: |
;mov [timer], word 0 |
;cmp eax,-1 |
;jnz fin |
;delay 100 |
write_debug 'CONNECTION FAILED' ;®¤ª«î票¥ ¥ 㤠«®áì |
jmp @f |
jmp c_end |
;connrcted: |
;CONNECTED |
|
fin: |
write_debug 'Connected!!!!' |
@@: |
c_end: |
pop edi |
pop esi |
pop edx |
540,8 → 593,7 |
; |
; --> ecx socket handle |
; |
buff db 1024 dup 0 |
lbuff db 8 dup 0 ; «ï 1 ¯ ª¥â ®â á¥à¢¥à |
|
srv_login: |
pushf |
push eax |
575,9 → 627,10 |
;mov [flap.bId], FLAP_ID |
mov [flap.bCh], NEW_CONNECTION |
|
mov eax, 26 |
mov ebx, 9 |
int 40h |
;mov eax, 26 |
;mov ebx, 9 |
;int 40h |
mcall 26, 9 |
mov [seq], ax |
|
mov [flap.wSn], ax ; Sequence number |
588,7 → 641,7 |
;mov[buff+4],0 |
mov word [buff+4], 0x0100; TLV.TYPE = UIN 00 01 |
|
mov eax, UIN |
lea eax, [vtable + vartable.uin] |
call strlen |
mov [buff+6], ah |
mov [buff+7], al ; Length of UIN |
597,18 → 650,19 |
|
mov ecx, eax ;«¨ áâப¨ |
|
mov eax, UIN |
lea eax, [vtable + vartable.uin] |
lea ebx, [buff+8] ; + à §¬¥à ¤ ëå ¢ ¡ãä¥à¥ + 1 |
|
call strcpy |
|
|
mov eax, PASS |
lea eax, [vtable + vartable.pass] |
call roast |
|
mov [buff+edx+2], 2 ; TLV.TYPE - rosted password |
call strlen |
mov word [buff+edx+4], ax ; Length of pass |
mov [buff+edx+4], al |
mov [buff+edx+3], ah ; Length of pass |
|
add edx, 4 |
mov ebx, buff |
615,7 → 669,7 |
add ebx, edx ; § 票¥ |
add edx, eax ; ®åà 塞 ¢ EDX ¤«¨ã § ¯®«¥®£® ¡ãäà |
mov ecx, eax ; «¨ áâப¨ |
mov eax, PASS ; áâ®ç¨ª |
lea eax, [vtable + vartable.pass] ; áâ®ç¨ª |
inc ebx |
call strcpy |
|
622,7 → 676,8 |
mov [buff+edx+2], 3 ; TLV.TYPE - client id string |
mov eax, ID_STRING |
call strlen |
mov word [buff+edx+4], ax |
mov [buff+edx+4], al |
mov [buff+edx+3], ah |
|
add edx, 4 |
mov ecx, eax |
633,34 → 688,48 |
mov eax, ID_STRING |
call strcpy |
|
xor eax, eax |
|
mov [buff+edx+2], 016h ; TLV.TYPE - Client id |
mov [buff+edx+4], 2 |
mov word [buff+edx+6], ID_NUM |
mov ax, ID_NUM |
call htons |
mov word [buff+edx+5], ax |
add edx, 6 |
|
mov [buff+edx+2], 017h ; Client major version |
mov [buff+edx+4], 2 |
mov [buff+edx+6], MAJOR |
mov ax, MAJOR |
call htons |
mov word [buff+edx+5], ax |
add edx, 6 |
|
mov [buff+edx+2], 018h ; Client minor version |
mov [buff+edx+4], 2 |
mov [buff+edx+6], MINOR |
mov ax, MINOR |
call htons |
mov word [buff+edx+5], ax |
add edx, 6 |
|
mov [buff+edx+2], 019h ; Client lesser version |
mov [buff+edx+4], 2 |
mov [buff+edx+6], LESSER |
mov ax, LESSER |
call htons |
mov word [buff+edx+5], ax |
add edx, 6 |
|
mov [buff+edx+2], 01Ah ; Client build number |
mov [buff+edx+4], 2 |
mov word [buff+edx+6], BUILD |
mov ax, BUILD |
call htons |
mov word [buff+edx+5], ax |
add edx, 6 |
|
mov [buff+edx+2], 014h ; Client distribution number |
mov [buff+edx+4], 4 |
mov [buff+edx+8], DISTR |
mov eax, DISTR |
call htonl |
mov dword [buff+edx+5], eax |
add edx, 8 |
|
mov [buff+edx+2], 0Fh ; Client language |
676,7 → 745,7 |
mov eax, CL_LANG |
call strcpy |
|
mov [buff+edx+2], 0Fh ; Client language |
mov [buff+edx+2], 0Eh ; Client country |
mov eax, CL_COUNTRY |
call strlen |
mov word [buff+edx+4], ax |
737,7 → 806,7 |
mov ax, word [mbuff+ebx] |
cmp ax, 0100h ; 00 01 TLV.Type UIN |
jz l_uin_ok ; ¥¯¥àì á¥à¢¥à ¯¥à¥¤ ¥â ¥é¥ ¤ ë¥ ¯à¨ ᮥ¤¨¥¨¨, ¯®â®¬ ®¯ïâì |
add ebx, 5 ; â®â ¦¥ TLV 1 |
add ebx, 5 ; â®â ¦¥ TLV 1 (®¢ë© ä®à¬ â ¯ ª¥ªâ ) |
cmp ebx, 5 |
ja l_tlvt_err |
jmp uin_loop |
804,17 → 873,18 |
; |
;call srv_disconnect |
mov ecx, [socket] |
;write_debug 'Closing socket' |
write_debug 'Closing socket' |
;call closesocket |
; |
; |
;mov eax, 53 |
;mov ebx, 8 |
;int 40h |
; |
;FIXME!!! |
; ª®¬¬¥â®à®¢ ® ¨§-§ ¯à®¡«¥¬ë á á¥â¥¢ë¬ á⥪®¬ |
;§ ªàë⨥ ᮪¥â § ¢¥è¨¢ ¥â á¨á⥬ã |
;mcall 53, 8, ecx |
|
|
|
|
mov eax, bos_address |
call ip_parser |
|
846,7 → 916,7 |
jmp l_fin |
|
l_len_err: |
write_debug 'RECEIVED DATA LENGTH MISMATCH' |
write_debug 'RECIVED DATA LENGTH MISMATCH' |
jmp l_fin |
|
l_tlvt_err: |
858,7 → 928,7 |
jmp l_fin |
|
l_flap_err: |
write_debug 'FLAP ID MISMATCH / RECEIVE ERROR' |
write_debug 'FLAP ID MISMATCH / RECIVE ERROR' |
|
l_fin: |
|
866,7 → 936,7 |
; ¥®¡å®¤¨¬® § ªàëâì ᮪¥â |
; |
;call srv_disconnect |
;call closesocket |
call closesocket |
l_end: |
pop edx |
;pop ecx |
957,6 → 1027,27 |
|
|
; |
; ªà®á ¤«ï áà ¢¥¨ï áâப |
; |
macro strcmp first, second, len |
{ |
push ecx |
push esi |
push edi |
|
mov ecx, len |
mov esi, first |
mov edi, second |
repe cmpsb |
|
pop edi |
pop esi |
pop ecx |
|
} |
|
|
; |
; ¯®«ï¥â ¡ãä¥à, ¯® ¤à¥áã ¢ ebx |
; ¤ 묨, ¯® ¤à¥áã eax, ¢ |
; cx - ¨¯ TLV |
1031,9 → 1122,10 |
xchg ecx, edx ; ecx - handle, edx - data size |
|
s_wait: |
mov eax, 53 ; ஢¥à塞 á®áâ®ï¨¥ ᮪¥â .
᫨ ᮥ¤¨¥¨¥ |
mov ebx, 6 ; ãáâ ®¢«¥® - ¯®áë« ¥¬ ¡ãä¥à, ¥á«¨ ᮪¥â § ªàëâ, ã室¨¬ |
int 40h |
;mov eax, 53 ; ஢¥à塞 á®áâ®ï¨¥ ᮪¥â .
᫨ ᮥ¤¨¥¨¥ |
;mov ebx, 6 ; ãáâ ®¢«¥® - ¯®áë« ¥¬ ¡ãä¥à, ¥á«¨ ᮪¥â § ªàëâ, ã室¨¬ |
;int 40h |
mcall 53, 6, ecx |
cmp eax, TCB_ESTABLISHED ; ãáâ ®¢«¥® |
jz s_est |
cmp eax, TCB_CLOSED |
1042,19 → 1134,21 |
jnc s_fin ; |
|
|
mov eax, 5 |
mov ebx, 1 |
int 40h ; ¤¥¬ |
;mov eax, 5 |
;mov ebx, 1 |
;int 40h ; ¤¥¬ |
mcall 5, 1 |
jmp s_wait |
|
|
s_est: |
mov eax, 53 |
mov ebx, 7 ; ¯¨á âì ¢ ᮪¥â |
;xchg ecx, edx ; ecx - handle, edx - data length |
;mov eax, 53 |
;mov ebx, 7 ; ¯¨á âì ¢ ᮪¥â |
|
add edx, 6 ; + size of header |
mov esi, sbuff ; data |
int 40h |
;mov esi, sbuff ; data |
;int 40h |
mcall 53, 7, ecx, edx, sbuff |
|
s_fin: |
pop ecx |
1065,129 → 1159,6 |
popf |
ret |
|
; |
; ਨ¬ ¥â ¯ ª¥â ¨§ ᮪¥â |
; eax - 㪠§ ⥫ì FLAP_head |
; ebx - 㪠§ â¥«ì ¬ áᨢ |
; ecx - 奤« ᮪¥â |
; ®§¢à é ¥â ¢ eax ª®«¨ç¥á⢮ ¯à¨ïâëå ¡ ©â ¢ ¬ áᨢ¥ |
; |
; recvflap: |
; pushf |
; |
; ;push eax |
; push ebx |
; push esi |
; push edi |
; push edx |
; mov esi, eax |
; mov edi, ebx |
; |
; r_fail: |
; mov eax, 53 ; ¯à 訢 ¥¬ ᮪¥â |
; mov ebx, 2 ; ¢ eax ª®«¨ç¥á⢮ ¯®«ãç¥ëå ¡ ©â |
; int 40h ; |
; cmp eax, 6 ; ¡ãä¥à ¥ ¯ãá⮩ |
; jnc r_ok |
; |
; mov eax, 53 ; ®«ãç ¥¬ á®áâ®ï¨¥ ᮪¥â |
; mov ebx, 6 ; |
; int 40h ; |
; |
; cmp eax, TCB_CLOSED ; § ªàëâ - ã室¨¬ |
; jz r_err |
; |
; |
; ;mov eax, 5 ; ¦¤¥¬ |
; ;mov ebx, 1 |
; ;int 40h |
; ; ã室¨¬ |
; |
; ;jmp r_fail |
; jmp rf_fin |
; |
; r_ok: ; ¡ãä¥à¥ ¤ ë¥ |
; |
; mov eax, 53 |
; mov ebx, 3 |
; int 40h |
; mov [esi], bl ; flap.bId |
; cmp bl, FLAP_ID |
; jnz r_err |
; |
; mov eax, 53 |
; mov ebx, 3 |
; int 40h |
; mov [esi+1], bl ; flap.bCh |
; |
; mov eax, 53 |
; mov ebx, 3 |
; int 40h |
; mov [esi+3], bl ; flap.wSn áâ à訩 ¡ ©â |
; |
; mov eax, 53 |
; mov ebx, 3 |
; int 40h |
; mov [esi+2], bl ; flap.wSn ¬« ¤è¨© ¡ ©â |
; |
; mov eax, 53 |
; mov ebx, 3 |
; int 40h |
; mov [esi+5], bl ; flap.wDs áâ à訩 ¡ ©â |
; |
; mov eax, 53 |
; mov ebx, 3 |
; int 40h |
; mov [esi+4], bl ; flap.wDs ¬« ¤è¨© ¡ ©â |
; |
; r_check: |
; mov eax, 53 ; ஢¥à塞 ç¨á«® ¯®«ãç¥ëå ¡ ©â |
; mov eax, 2 |
; int 40h |
; |
; xor ebx, ebx |
; mov bx, word [esi+4] ; flap.wDs |
; cmp eax, ebx |
; jnc r_drr ;>= |
; |
; mov eax, 68 ; wait |
; mov ebx, 1 |
; int 40h |
; jmp r_check |
; |
; r_drr: ; ready for data recive |
; |
; |
; xor edx, edx |
; mov dx, word [esi+4] ; flap.wDs |
; xor esi, esi |
; |
; rf_loop: |
; mov eax, 53 |
; mov ebx, 3 |
; int 40h |
; mov [edi+esi], bl |
; inc esi |
; cmp esi, edx |
; jnz rf_loop |
; mov eax, edx |
; jmp rf_fin |
; |
; r_err: |
; ;pop ebx |
; ;pop eax |
; mov eax, -1 |
; jmp rf_fin |
; |
; |
; rf_fin: |
; pop edx |
; pop edi |
; pop esi |
; pop ebx |
; ;pop eax |
; popf |
; ret |
|
; |
; eax - 㪠§ â¥«ì ¡ãä¥à |
1251,15 → 1222,16 |
; |
closesocket: |
push eax |
push ebx |
;push ebx |
|
mov eax, 53 |
mov ebx, 8 |
int 40h |
;mov eax, 53 |
;mov ebx, 8 |
;int 40h |
mcall 53, 8, ecx |
|
mov ecx, eax |
|
pop ebx |
;pop ebx |
pop eax |
ret |
|
1304,7 → 1276,7 |
|
xor ecx, ecx |
;xor eax, eax |
xor ebx, ebx |
mov ebx, eax |
xor edx, edx |
xor esi, esi |
xor edi, edi |
1312,7 → 1284,7 |
ip_loop: |
xor eax, eax |
;xor edx, edx |
mov al, [bos_address+ecx] |
mov al, [ebx+ecx] |
cmp al, '.' |
jz ip_dot |
|
1362,7 → 1334,7 |
shl esi, 8 ; ¤¢¨£ ¥¬ ¯à¥¤ë¤ã騩 ¡ ©â |
add esi, eax |
;mov eax, esi ; IP ¢ 16 à¨ç®© ä®à¬¥ |
;xor ebx, ebx ; ®¬¥à ¯®àâ ¥â |
xor ebx, ebx ; ®¬¥à ¯®àâ ¥â |
jmp ip_end |
|
@@: ; ë«® : |
1608,7 → 1580,7 |
; ¡à ¡®âª à áᮥ¤¨¥¨ï |
; |
m_close_conn: |
write_debug 'Another Computer is Using YOUR UIN!' |
write_debug 'Another Computer Use YOUR UIN!' |
call srv_disconnect |
call closesocket |
jmp m_fin |
1629,9 → 1601,10 |
; £¥¥à¨à㥬 á«ãç ©ë© seq |
; «ï í⮣® ¡¥à¥¬ ¢à¥¬ï, ¯à®è¥¤è¥¥ á ¬®¬¥â § ¯ã᪠á¨á⥬ë |
; |
mov eax, 26 |
mov ebx, 9 |
int 40h |
;mov eax, 26 |
;mov ebx, 9 |
;int 40h |
mcall 26, 9 |
mov [seq], ax |
; |
; ⤠¥¬ á¥à¢¥àã cookie |
1881,7 → 1854,7 |
|
|
m_snac_1_other: |
data_debug 'Unknown SNAC Family 1 received, type ', edx |
data_debug 'Unknown SNAC Family 1 recived, type ', edx |
jmp m_fin |
|
|
1999,7 → 1972,7 |
; |
; § ¢á¥© ¨ä®à¬ 樨 ¯®ª 㦥 ⮫쪮 áâ âãá |
; |
xor edx, edx ; ç¥â稪 |
xor edx, edx ; ç¥â稪 - ®¬¥à UIN ¢ ¬ áᨢ¥ |
xor ecx, ecx |
xor eax, eax |
cld ; ¯à ¢«¥¨¨ 㢥«¨ç¥¨ï ¤à¥á®¢ |
2023,34 → 1996,79 |
; UIN ¯à¥¤¥«¥ |
; |
|
lea ecx, [eax+10+11] ; +sizeof SNAC_head + offset #2 TLV |
mov ax, word [mbuff+ecx] ;#2 TLV.Type |
cmp ax, 0C00h ;dc info (optional) |
jz m_snac_3_b_dc |
cmp ax, 0A00h ;external ip address |
jz m_snac_3_b_extip |
jmp m_snac_3_b_bad_tlv |
; |
; ©â¨ TLV á® áâ âãᮬ |
; á®åà ïâì edx |
|
xor esi, esi ; ç¥â稪 TLV |
|
m_snac_3_b_dc: |
xor ecx, ecx |
mov ch, byte [mbuff + eax + 13] ; ®«-¢® TLV ¢ 楯®çª¥ |
mov cl, byte [mbuff + eax + 14] ; |
|
lea eax, [eax + 10 + 5] ; eax 㪠§ ⥫ì 楯®çªã TLV |
lea eax, [mbuff + eax] ; |
|
|
m_snac_3_b_next_tlv: |
cmp esi, ecx |
jz m_snac_3_b_endchain |
|
|
xor ebx, ebx |
mov bh, [eax] ; |
mov bl, [eax + 1] ; TLV.Type |
|
data_debug 'TLV type', ebx |
|
cmp ebx, 0x06 ;TLV.Type(0x06) - user status |
jz m_snac_3_b_status |
|
; |
; §¡¨à ¥¬ 楯®çªã ¤ «ìè¥ |
; |
|
get_next_tlv |
inc esi |
jmp m_snac_3_b_next_tlv |
|
|
|
; FIXME ¥®¯â¨¬ «ì® - ª®¤ ¡ã¤¥â 㤠«¥ |
; |
;lea ecx, [eax+10+11] ; +sizeof SNAC_head + offset #2 TLV |
;mov ax, word [mbuff+ecx] ;#2 TLV.Type |
;cmp ax, 0C00h ;dc info (optional) |
;jz m_snac_3_b_dc |
;cmp ax, 0A00h ;external ip address |
;jz m_snac_3_b_extip |
;jmp m_snac_3_b_bad_tlv |
|
|
;m_snac_3_b_dc: |
; |
; யã᪠¥¬ íâ®â TLV |
; |
lea ecx, [ecx+41] |
m_snac_3_b_extip: |
;lea ecx, [ecx+41] |
;m_snac_3_b_extip: |
; |
; íâ®â :-) |
lea ecx, [ecx+8] |
mov ax, word [mbuff+ecx] |
cmp ax, 0600h ;TLV.Type(0x0A) - external ip address |
jz m_snac_3_b_status |
jmp m_snac_3_b_bad_tlv |
;lea ecx, [ecx+8] |
;mov ax, word [mbuff+ecx] |
;cmp ax, 0600h ;TLV.Type(0x0A) - external ip address |
;jz m_snac_3_b_status |
;jmp m_snac_3_b_bad_tlv |
; |
; |
|
|
m_snac_3_b_status: |
; |
; ª®¥æ-â® áâ âãá 8-) |
; áâ âãá |
; |
mov eax, dword [mbuff+ecx+4] |
mov ecx, eax |
mov eax, dword [ecx + 4] |
;mov eax, dword [mbuff+ecx+4] |
call ntohl |
;mov ebx, 4 |
;imul ebx, edx |
2072,8 → 2090,11 |
write_debug 'UIN not in local Contact List' |
jmp m_fin |
|
m_snac_3_b_endchain: |
jmp m_fin |
|
|
|
m_snac_3_c: |
; |
; User offline notification |
2115,7 → 2136,7 |
|
|
m_snac_3_other: |
write_debug 'Unknown SNAC Family 3 Received' |
write_debug 'Unknown SNAC Family 3 Recived' |
jmp m_fin |
|
|
2331,10 → 2352,64 |
call strcpy |
|
lea ebx, [ebx+ecx] |
|
; |
; ¥¯«®å® ¡ë«® ¡ë ¢ë¢¥á⨠¥ UIN Nickname, ¥á«¨ ® ¥áâì ¢ ª®â ªâ «¨á⥠|
; |
xor esi, esi ; ç¥â稪 |
|
m_snac_ch1_next_uin: |
|
cmp esi, UINS |
jz m_snac_ch1_notfound |
|
mov edx, UIN_LEN |
imul edx, esi |
|
lea edx, [uins + edx] |
movzx ecx, byte [ui.bUinLength] |
strcmp edx, ui.bUin, ecx |
jz m_snac_ch1_uin |
|
inc esi |
jmp m_snac_ch1_next_uin |
|
|
; |
; ®¤å®¤ï騩 UIN ¥áâì ¢ ª®â ªâ-«¨á⥠|
; |
m_snac_ch1_uin: |
|
mov edx, NAME_LEN |
imul edx, esi |
|
lea edx, [names + edx] |
mov eax, edx |
|
|
call strlen |
mov ecx, eax |
|
mov eax, edx |
call strcpy |
|
jmp m_snac_ch1_msgfrom |
|
|
; |
;
᫨ ¯®¤å®¤ï饣® UIN ¥â ¢ ª®â ªâ-«¨á⥠|
; |
m_snac_ch1_notfound: |
|
lea eax, [ui.bUin] |
movzx ecx, byte [ui.bUinLength] |
call strcpy |
|
; |
; 뢮¤ á®®¡é¥¨ï "®â ª®£®" |
; |
m_snac_ch1_msgfrom: |
|
mov [ebx+ecx], byte 0 |
|
mov eax, buff |
2447,7 → 2522,7 |
|
|
m_snac_4_other: |
write_debug 'Unknown SNAC Family 4 received' |
write_debug 'Unknown SNAC Family 4 recived' |
jmp m_fin |
|
|
2467,8 → 2542,28 |
; |
; ¡à ¡®âª¨ ¯®ª ¥â |
; |
if USE_SSI <> 0 |
|
; |
; ¯à®á á á¥à¢¥à |
; |
|
; |
; Request contact list (first time) |
; |
mov [ssnac.wFid], 13h ; Family |
mov [ssnac.wSid], 04h ; Subtype |
mov [ssnac.dRi], 04h ; request-id |
|
mov eax, ssnac |
mov ebx, buff |
xor edx, edx |
call sendsnac |
|
|
else |
|
|
; ⪫î祮, ⪠¥ ¯®¤¤¥à¦¨¢ ¥âáï SIQ |
; |
|
2546,32 → 2641,32 |
; |
; &RQ
áâì ¯ ª¥â ãáâ ®¢ª¨ à §à¥è¥¨©. ï ¨á¯®«ì§ãî ¥£® ¡¥§ ¨§¬¥¥¨ï |
; â.ª. ¥ § î, çâ® ® ᮤ¥à¦¨â |
; |
; - ¢®§¬®¦®, ¡ã¤ã ¨á¯®«ì§®¢ âì ¯®§¤¥¥ |
|
mov [ssnac.wFid], 15 ; Family |
mov [ssnac.wSid], 2 ; Subtype |
mov [ssnac.dRi], 2 |
;mov [ssnac.wFid], 15 ; Family |
;mov [ssnac.wSid], 2 ; Subtype |
;mov [ssnac.dRi], 2 |
|
mov word [buff], 0100h ; 00 01 encapsulated META_DATA |
mov word [buff+2], 1000h ; 00 10 Len |
mov word [buff+4], 000Eh ; LE Len |
mov word [buff+10], 07D0h ; META_DATA_REQ |
;mov word [buff], 0100h ; 00 01 encapsulated META_DATA |
;mov word [buff+2], 1000h ; 00 10 Len |
;mov word [buff+4], 000Eh ; LE Len |
;mov word [buff+10], 07D0h ; META_DATA_REQ |
|
|
mov eax, UIN |
call ascitoint |
mov dword [buff+6], eax |
;mov eax, UIN |
;call ascitoint |
;mov dword [buff+6], eax |
|
mov word [buff+12], 0102h ; request sequence number (incrementing) |
mov word [buff+14], 0424h ; META_SET_PERMS_USERINFO |
mov [buff+16], 1 ; authorization (1-required, 0-not required) |
mov [buff+17], byte 0 ; webaware (0-no, 1-yes) |
mov [buff+18], 1 ; dc_perms (0-any, 1-contact, 2-authorization) |
mov [buff+19], 0 ;unknown |
;mov word [buff+12], 0102h ; request sequence number (incrementing) |
;mov word [buff+14], 0424h ; META_SET_PERMS_USERINFO |
;mov [buff+16], 1 ; authorization (1-required, 0-not required) |
;mov [buff+17], byte 0 ; webaware (0-no, 1-yes) |
;mov [buff+18], 1 ; dc_perms (0-any, 1-contact, 2-authorization) |
;mov [buff+19], 0 ;unknown |
|
mov eax, ssnac |
mov ebx, buff |
mov edx, 20 |
;mov eax, ssnac |
;mov ebx, buff |
;mov edx, 20 |
|
|
; |
2604,12 → 2699,12 |
mov word [buff], 0100h ; TLV type 01 |
mov word [buff+2], 0A00h ; 00 0a Ǭ |
mov word [buff+4], 0008h ; 08 00 |
mov eax, UIN |
lea eax, [vtable + vartable.uin] |
call ascitoint |
mov dword [buff+6], eax |
|
mov [buff+10], 003Ch ; 3C 00 - ¯à®á ®ää« ©®¢ë¥ á®®¡é¥¨ï |
mov [buff+12], 0002 ; 02 00 - request sequence number |
mov word [buff+10], 003Ch ; 3C 00 - ¯à®á ®ää« ©®¢ë¥ á®®¡é¥¨ï |
mov word [buff+12], 0002 ; 02 00 - request sequence number |
|
mov edx, 14 ; ¡é¨© à §¬¥à ¤ ëå ¢ ¡ãä¥à¥ |
|
2628,10 → 2723,13 |
; |
mov [login], 2 |
|
|
end if ; USE_SSI = 0 |
|
jmp m_fin |
|
m_snac_9_other: |
write_debug 'Unknown SNAC Family 9 Received' |
write_debug 'Unknown SNAC Family 9 Recived' |
jmp m_fin |
|
|
2641,6 → 2739,8 |
m_snac_13: |
cmp dx, 3 |
jz m_snac_13_3 |
cmp dx, 6 |
jz m_snac_13_6 |
cmp dx, 0fh |
jz m_snac_13_F |
|
2661,14 → 2761,17 |
mov [ssnac.wSid], 5 ; Subtype |
mov [ssnac.dRi], 5 ; request-id |
mov eax, ssnac |
; 3D E7 48 17 |
; |
; |
; |
mov [buff], 03Dh ; |
mov [buff+1], 0E7h ; modification date/time of client local SSI copy |
mov [buff+2], 48h ; |
mov [buff+3], 17h ; |
; 00 10 |
; |
; |
mov [buff+4], 00 ; |
mov [buff+5], 10h ; number of items in client local SSI copy |
mov [buff+5], 00h ; number of items in client local SSI copy |
|
mov ebx, buff |
mov edx, 5 |
2676,7 → 2779,181 |
|
jmp m_fin |
|
|
; |
; Server contact list reply |
; |
m_snac_13_6: |
|
lea eax, [mbuff+10] ; eax § £à㦠¥¬ ¤à¥á ¯à¨¥¬®£® ¡ãä¥à + à §¬¥à § £®«®¢ª snac |
|
call ssi_process_data ; ¡à ¡®âª ¯ ª¥â á |
|
; |
; ªâ¨¢¨à㥬 SSI |
; |
|
mov [ssnac.wFid], 13h ; Family |
mov [ssnac.wSid], 7 ; Subtype |
mov [ssnac.dRi], 7 ; request-id |
mov eax, ssnac |
mov ebx, buff |
xor edx, edx |
call sendsnac |
|
|
; |
; ¯®á«¥¤ïï áâ ¤¨ï ᮥ¤¨¥¨ï |
; |
|
; |
; ¯à 訢 ¥¬ á¢®î ¨ä®à¬ æ¨î |
; |
mov [ssnac.wFid], 1 ; Family |
mov [ssnac.wSid], 0Eh ; Subtype |
mov [ssnac.dRi], 0Eh ; request-id |
|
mov eax, ssnac |
mov ebx, buff |
xor edx, edx ; TLV head len |
call sendsnac |
|
|
; |
; Client sends its DC info and status to server |
; |
mov [ssnac.wFid], 1 ; Family |
mov [ssnac.wSid], 1Eh ; Subtype |
mov [ssnac.dRi], 1Eh ; request-id |
|
mov [buff], 0 ; TLV type 06 |
mov [buff+1], 6h ; |
mov [buff+2], 0 ; TLV data length |
mov [buff+3], 4 ; |
; |
; |
mov ax, STATUS_DCDISABLED ; DC disabled |
call htons |
mov word [buff+4], ax |
mov ax, STATUS_ONLINE |
mov [status], ax |
mov word [buff+6], ax |
|
mov eax, ssnac |
mov ebx, buff |
mov edx, 8 ; TLV head len+ data len |
call sendsnac |
|
|
; |
; ë£à㦠¥¬ á¥à¢¥à |
; FIXME ®§¬®¦®, §¤¥áì ¥ 㦠íâ äãªæ¨ï |
;call uploadkl |
|
; |
; ë£à㦠¥¬ ¨¢¨§¨¡« «¨áâ, ¯®ª ¯ãá⮩ |
; |
;mov [ssnac.wFid], 9 ; Family |
;mov [ssnac.wSid], 7 ; Subtype |
;mov [ssnac.dRi], 7 |
|
;mov eax, ssnac |
;mov ebx, buff |
;xor edx, edx |
;call sendsnac |
|
; |
; &RQ
áâì ¯ ª¥â ãáâ ®¢ª¨ à §à¥è¥¨©. ï ¨á¯®«ì§ãî ¥£® ¡¥§ ¨§¬¥¥¨ï |
; â.ª. ¥ § î, çâ® ® ᮤ¥à¦¨â |
; - ¢®§¬®¦®, ¡ã¤ã ¨á¯®«ì§®¢ âì ¯®§¤¥¥ |
|
;mov [ssnac.wFid], 15 ; Family |
;mov [ssnac.wSid], 2 ; Subtype |
;mov [ssnac.dRi], 2 |
|
;mov word [buff], 0100h ; 00 01 encapsulated META_DATA |
;mov word [buff+2], 1000h ; 00 10 Len |
;mov word [buff+4], 000Eh ; LE Len |
;mov word [buff+10], 07D0h ; META_DATA_REQ |
|
|
;mov eax, UIN |
;call ascitoint |
;mov dword [buff+6], eax |
|
;mov word [buff+12], 0102h ; request sequence number (incrementing) |
;mov word [buff+14], 0424h ; META_SET_PERMS_USERINFO |
;mov [buff+16], 1 ; authorization (1-required, 0-not required) |
;mov [buff+17], byte 0 ; webaware (0-no, 1-yes) |
;mov [buff+18], 1 ; dc_perms (0-any, 1-contact, 2-authorization) |
;mov [buff+19], 0 ;unknown |
|
;mov eax, ssnac |
;mov ebx, buff |
;mov edx, 20 |
|
|
; |
; Client READY command |
; |
mov [ssnac.wFid], 1 ; Family |
mov [ssnac.wSid], 2 ; Subtype |
mov [ssnac.dRi], 2 ; request-id |
|
mov eax, FAMILY_ARR |
mov ebx, buff |
push ecx |
mov ecx, FA_LEN |
call strcpy |
pop ecx |
|
mov eax, ssnac |
mov ebx, buff |
mov edx, FA_LEN |
call sendsnac |
|
|
; |
; ¯à 訢 ¥¬ offline á®®¡é¥¨ï |
; |
mov [ssnac.wFid], 15h ; Family |
mov [ssnac.wSid], 2 ; Subtype |
mov [ssnac.dRi], 2 ; request-id |
|
mov word [buff], 0100h ; TLV type 01 |
mov word [buff+2], 0A00h ; 00 0a Ǭ |
mov word [buff+4], 0008h ; 08 00 |
lea eax, [vtable + vartable.uin] |
call ascitoint |
mov dword [buff+6], eax |
|
mov word [buff+10], 003Ch ; 3C 00 - ¯à®á ®ää« ©®¢ë¥ á®®¡é¥¨ï |
mov word [buff+12], 0002 ; 02 00 - request sequence number |
|
mov edx, 14 ; ¡é¨© à §¬¥à ¤ ëå ¢ ¡ãä¥à¥ |
|
mov eax, ssnac |
mov ebx, buff |
call sendsnac |
|
|
|
; |
; ¯à 訢 ¥¬ ¨ä®à¬ æ¨î ¢á¥å UIN |
; FIXME ®§¬®¦®, §¤¥áì ¥ 㦠íâ äãªæ¨ï |
;call getinfo |
; |
; § ¢¥à襮 ᮥ¤¨¥¨¥ |
; |
mov [login], 2 |
|
|
jmp m_fin |
|
|
|
|
; |
; Server tell client its local copy up-to-date |
; |
m_snac_13_F: |
2715,8 → 2992,9 |
mov ax, STATUS_DCDISABLED ; DC disabled |
call htons |
mov word [buff+4], ax |
mov ax, STATUS_ONLINE |
mov [status], ax |
; |
; |
mov ax, [status] |
mov word [buff+6], ax |
|
mov eax, ssnac |
2754,7 → 3032,7 |
mov word [buff], 0100h ; TLV type 01 |
mov word [buff+2], 0A00h ; 00 0a Ǭ |
mov word [buff+4], 0008h ; 08 00 |
mov eax, UIN |
lea eax, [vtable + vartable.uin] |
call ascitoint |
mov dword [buff+6], eax |
|
2772,7 → 3050,7 |
jmp m_fin |
|
m_snac_13_other: |
write_debug 'Unknown SNAC Family 13 Received' |
write_debug 'Unknown SNAC Family 13 Recived' |
jmp m_fin |
|
|
2901,7 → 3179,7 |
mov word [buff], 0100h ; 00 01 TLV.Type(1) - encapsulated META_DATA1 |
mov word [buff+2], 0A00h ; 00 0A TLV.Length |
mov word [buff+4], 0008h ; 08 00 data chunk size (TLV.Length-2) |
mov eax, UIN |
lea eax, [vtable + vartable.uin] |
call ascitoint |
mov dword [buff+6], eax ; xx xx xx xx (LE) client uin |
mov word [buff+10], 003Eh ; 3E 00 (LE) data type: delete offline msgs request cmd |
2990,13 → 3268,13 |
|
m_snac_15_other: |
|
write_debug 'Unknown SNAC Family 15 Received' |
write_debug 'Unknown SNAC Family 15 Recived' |
|
jmp m_fin |
|
|
m_other_snac: |
write_debug 'Unknown SNAC received' |
write_debug 'Unknown SNAC recived' |
jmp m_fin |
|
|
3130,9 → 3408,10 |
; |
; ®«ãç ¥¬ ¢à¥¬ï á § ¯ã᪠á¨á⥬ë, ¤«ï cookie |
; |
mov eax, 26 |
mov ebx, 9 |
int 40h |
;mov eax, 26 |
;mov ebx, 9 |
;int 40h |
mcall 26, 9 |
|
mov dword [buff], eax ; Cookie 1 |
mov dword [buff+4], eax ; Cookie 2 |
3231,7 → 3510,7 |
mov word [buff], 0100h ;TLV.Type(1) - encapsulated META_DATA |
mov word [buff+2], 1000h ; 00 10 TLV.Length |
mov word [buff+4], 000Eh ; (LE) data chunk size (TLV.Length-2) |
mov eax, UIN |
lea eax, [vtable + vartable.uin] |
call ascitoint |
mov dword [buff+6], eax ;(LE) request owner uin |
mov word [buff+10], 07D0h ;data type: META_DATA_REQ |
3357,25 → 3636,230 |
popf |
ret |
|
; |
; ãªæ¨ï ¤«ï ãáâ ®¢ª¨ áâ âãá |
; áâ âãá ¢ ¯¥à¥¬¥®© status |
setstatus: |
push eax |
push ebx |
push edx |
; |
; Client sends its DC info and status to server |
; |
mov [ssnac.wFid], 1 ; Family |
mov [ssnac.wSid], 1Eh ; Subtype |
mov [ssnac.dRi], 1Eh ; request-id |
|
mov [buff], 0 ; TLV type 06 |
mov [buff+1], 6h ; |
mov [buff+2], 0 ; TLV data length |
mov [buff+3], 4 ; |
; |
; |
mov ax, STATUS_DCDISABLED ; DC disabled |
call htons |
mov word [buff+4], ax |
; |
; |
mov ax, [status] |
mov word [buff+6], ax |
|
mov eax, ssnac |
mov ebx, buff |
mov edx, 8 ; TLV head len+ data len |
call sendsnac |
|
pop edx |
pop ebx |
pop eax |
ret |
|
|
; |
; ªà®á ¯à®¯ã᪠¥â ¢á¥ ¯à®¡¥«ë ¢ áâப¥ ¤® |
; 1 £® § ç 饣® ᨬ¢®« |
; eax - 㪠§ ⥫ì null-terminated áâபã |
|
macro skip_spaces { |
local ..sp_end, ..sp_loop |
|
push ebx |
push ecx |
|
xor ebx, ebx |
xor ecx, ecx |
|
..sp_loop: |
|
|
mov bl, [eax + ecx] |
cmp bl, 0x20 |
jnz ..sp_end |
|
|
inc ecx |
jmp ..sp_loop |
|
|
|
..sp_end: |
lea eax, [eax + ecx] |
|
pop ecx |
pop ebx |
} |
|
|
|
|
|
; |
; ¡à ¡®âª ª®¬ ¤ |
; ¥ax ¯¥à¥¤ ¥âáï 㪠§ ⥫ì áâபã. ®¬ ¤ ¨ à£ã¬¥âë à §¤¥«¥ë ¯à®¡¥«®¬ |
; ª®¬ ¤ ç¨ ¥âáï á / |
; ¢ eax - १ã«ìâ ⠢믮«¥¨ï ª®¬ ¤ë, -1 ª®¬ ¤ ¥ áãé¥áâ¢ã¥â, 0 ®ª, ¤à㣨¥ § ¢¨áï⠮⠪®¬ ¤ë |
|
cmd: |
push ebx |
push ecx |
push edi |
push esi |
|
; |
; ஢¥à¨âì ¯¥à¢ë© ᨬ¢®« |
; |
xor ebx, ebx |
mov bl, [eax] |
cmp bl, '/' |
jnz cmd_end |
|
; |
; §¤¥«¥¨¥ ¯® 1© ¡ãª¢¥ ª®¬ ¤ë |
; |
mov bl, [eax + 1] |
|
cmp bl, 'c' |
jz cmd_c |
|
cmp bl, 'e' |
jz cmd_e |
|
cmp bl, 's' |
jz cmd_s |
|
jmp cmd_no |
|
cmd_c: |
|
cmd_e: |
|
lea ebx, [eax + 1] |
strcmp ebx, str_exit, str_exit.len |
jz cmd_exit |
|
jmp cmd_no |
|
|
|
|
cmd_s: |
|
lea ebx, [eax + 1] |
strcmp ebx, str_status, str_status.len |
jz cmd_status |
|
jmp cmd_no |
|
|
|
cmd_exit: |
|
|
cmd_status: |
; |
; ãáâ ®¢¨âì áâ âãá ¨ ¯®á« âì ¯ ª¥â ᬥë áâ âãá |
; |
lea eax, [eax + 1 + str_status.len] |
skip_spaces |
|
strcmp eax, str_online, str_online.len |
jz cmd_st_online |
|
strcmp eax, str_away, str_away.len |
jz cmd_st_away |
|
strcmp eax, str_na, str_na.len |
jz cmd_st_na |
|
strcmp eax, str_dnd, str_dnd.len |
jz cmd_st_dnd |
|
strcmp eax, str_bisy, str_bisy.len |
jz cmd_st_bisy |
|
strcmp eax, str_free4chat, str_free4chat.len |
jz cmd_st_free4chat |
|
; |
; â âãá ¥ ®¯à¥¤¥«¥. |
; 뢥á⨠ᮮ¡é¥¨¥ ® ¤®áâã¯ëå áâ âãá å |
; |
mov eax, str_status_message |
xor ebx, ebx |
call writemsg |
|
jmp cmd_end |
|
|
cmd_st_online: |
|
cmd_st_away: |
|
cmd_st_na: |
|
cmd_st_dnd: |
|
cmd_st_bisy: |
|
cmd_st_free4chat: |
|
|
cmd_no: |
|
cmd_end: |
pop esi |
pop edi |
pop ecx |
pop ebx |
|
ret |
|
|
|
|
; <--- initialised data ---> |
DATA |
lsz header,\ |
ru, "KI",\ |
en, "KI",\ |
fr, "KI" |
include "parser_data.inc" |
include "ssi_data.inc" |
include "comp_data.inc" |
|
|
head db 'KI',0 |
|
|
; |
MESS db 'Message from ', 0 |
CUSER db 'Current user: ', 0 |
|
; |
; ¯¨á®ª IP á¥à¢¥à®¢ ICQ |
|
;ICQ_IP = 0x0A00A8C0 ; 192.168.0.10 |
ICQ_IP = 0x99A10C40 |
;205.188.153.121 |
;icq_ip db '64.12.200.089',0 |
;icq_ip db '64.12.161.185',0 |
;icq_ip db '205.188.179.233',0 |
|
|
; |
flap FLAP_head |
rflap FLAP_head |
3387,15 → 3871,37 |
; |
procinfo process_information |
; |
UIN db '123456789',0 |
PASS db 'coolpass',0 |
;UIN db '362820484',0 |
;PASS db 'test',0 |
ID_STRING db 'ICQ Inc. - Product of ICQ (TM).2000b.4.65.1.3281.85',0 |
;ID_STRING db 'ICQ Inc. - Product of ICQ (TM).2001b.5.17.1.3642.85',0 |
CAPABILITIES db 053h, 054h, 0, 0, 097h, 0B1h, 027h, 051h, 024h, 03Ch, 043h, 034h, 0ADh, 022h, 0D6h, 0ABh,\ |
0F7h, 03Fh, 014h, 092h, 02Eh, 07Ah, 064h, 075h, 0FAh, 0DFh, 04Dh, 0C8h, 088h, 06Fh, 0EAh, 035h,\ |
095h, 0FDh, 0B6h, 0DFh, 09h, 046h, 013h, 044h, 04Ch, 07Fh, 011h, 0D1h, 082h, 022h, 044h, 045h,\ |
053h, 054h, 0, 0 |
|
|
;CAPABILITIES db 0x09, 0x46, 0x13, 0x49, 0x4C, 0x7F, 0x11, 0xD1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00,\ |
;0x97, 0xB1, 0x27, 0x51, 0x24, 0x3C, 0x43, 0x34, 0xAD, 0x22, 0xD6, 0xAB, 0xF7, 0x3F, 0x14, 0x92,\ |
CAPABILITIES db 0x2E, 0x7A, 0x64, 0x75, 0xFA, 0xDF, 0x4D, 0xC8, 0x88, 0x6F, 0xEA, 0x35, 0x95, 0xFD, 0xB6, 0xDF,\ |
'KOLIBRI KI(cq)',0,0 |
;0x09, 0x46, 0x13, 0x44, 0x4C, 0x7F, 0x11, 0xD1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00 |
|
; 1 áâப |
; {09461349-4C7F-11D1-8222-444553540000} |
; Client supports channel 2 extended, TLV(0x2711) based messages. Currently used only by ICQ clients. |
;ICQ clients and clones use this GUID as message format sign. Trillian client use another GUID |
; in channel 2 messages to implement its own message format (trillian doesn't use TLV(x2711) in SecureIM channel 2 messages!). |
; |
; 2 áâப |
; {97B12751-243C-4334-AD22-D6ABF73F1492} |
; Client supports RTF messages. This capability currently used by ICQ service and ICQ clients. |
; |
; 4 áâப |
; {0946134E-4C7F-11D1-8222-444553540000} |
; Client supports UTF-8 messages. This capability currently used by AIM service and AIM clients |
; |
|
|
|
|
; |
; From &RQ |
; |
|
3407,7 → 3913,7 |
; 0x00, 0x00, 0x00, 0x00 |
|
|
C_LEN = 40h |
C_LEN = 32 |
;C_LEN = 80 |
ICBM_PARAMS db 0, 0, 0, 0, 0, 0Bh, 01Fh, 040h, 3, 0E7h, 3, 0E7h, 0, 0, 0, 0 |
ICBMP_LEN = 16 ; ^^^ from &RQ |
3422,13 → 3928,14 |
0x00, 0x06, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B, 0x00, 0x09, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B,\ |
0x00, 0x0A, 0x00, 0x01, 0x01, 0x10, 0x04, 0x7B, 0x00, 0x10, 0x00, 0x01, 0x00, 0x10, 0x06, 0x6A |
|
; |
; |
; |
|
|
|
|
FA_LEN = 50h |
|
; |
; |
; |
ID_NUM = 010Ah |
MAJOR = 05h |
;MAJOR = 04h |
3438,6 → 3945,9 |
;BUILD = 0CD1h |
BUILD = 0E3Ah |
DISTR = 055h |
; |
; |
|
TCB_ESTABLISHED = 4 |
TCB_CLOSED = 11 |
; |
3447,7 → 3957,9 |
|
sbuff db 1024 dup 0 ; ãä¥à ¤«ï ¯¥à¥¤ ç¨ ¨á¯®«ì§ã¥âáï ¢ãâਠsendflap |
|
rbuff db 1024 dup 0 ; ਥ¬ë© ¡ãä¥à |
;recived db 0 ; à¨ïâ® ¤ ëå ¨§ ⥫ ¯ ª¥â |
|
;rbuff db 1024 dup 0 ; ਥ¬ë© ¡ãä¥à |
tbuff db 512 dup 0 ; «ï TLV |
srv_cookie db 512 dup 0 ; 㪨 ¤«ï ¢â®à¨§ 樨 |
bos_address db 128 dup 0 ; ¤à¥á BOS á¥à¢¥à |
3476,10 → 3988,48 |
timer dw 0 |
|
;ltest db "ADMIN",0 |
buff db 1024 dup 0 |
; lbuff db 8 dup 0 ; «ï 1 ¯ ª¥â ®â á¥à¢¥à |
|
; |
; âப¨ ª®¬ ¤ ¤«ï áà ¢¥¨ï |
; |
str_status db 'status ' |
str_status.len = $ - str_status |
str_exit db 'exit ' |
str_exit.len = $ - str_exit |
; |
; âப¨ áâ âãᮢ ¤«ï áà ¢¥¨ï |
; |
str_away db 'away' |
str_away.len = $ - str_away |
|
str_dnd db 'dnd' |
str_dnd.len = $ - str_dnd |
|
str_bisy db 'bisy' |
str_bisy.len = $ - str_bisy |
|
str_na db 'na' |
str_na.len = $ - str_na |
|
str_online db 'online' |
str_online.len = $ - str_online |
|
str_free4chat db 'free4chat' |
str_free4chat.len = $ - str_free4chat |
|
str_status_message db '®áâã¯ë¥ áâ âãáë: away, bisy, na, dnd, online, free4chat',0 |
|
|
; |
; |
; |
|
cfg_message db 'Config:',0 |
|
|
; |
; EDITBOXES |
; |
inputbuff: |