QBasic reverse Need help
Posted: Tue Dec 28, 2010 11:56 pm
First, sorry for my bad endlish. If you know what i say,please help me~
Thanks~
Here is a program maked with QBasic7.1, I reverse it by IDA Pro5.6 and found following SUB:
SEG01sub11728 proc far ; CODE XREF: SEG27sub5741D+19A4P
var_16 = word ptr -16h
var_14 = word ptr -14h
mov cx, 4
mov bx, 0
call far ptr B$ENRD ; Allocate space on stack
;
call near ptr EventChk1
call B$LINA
mov ds:word718E2, 64h ; 'd'
call near ptr EventChk1
call B$LINA
push offset word718E2
call SEG15sub35826
mov [bp+var_14], ax
mov si, 5FCh
mov ax, [bp+var_14]
mov [si+54B4h], ax ; here is problem1
call near ptr EventChk1
call B$LINA
mov ds:word718E4, 64h ; 'd'
call near ptr EventChk1
call B$LINA
push offset word718E4
call SEG15sub35826
mov [bp+var_16], ax
xor si, si
mov ax, [bp+var_16]
mov [si+54B4h], ax ; here is problem2
call near ptr EventChk1
call B$LINA
call far ptr B$EXSA
retf 0
SEG01sub11728 endp
Convert it to following QBasic code:
SUB SEG01sub11728
word718E2% = &H64
var14% = SEG15sub35826%(word718E2%)
'
' How the problem1 Asmcode are converted ?
'
word718E4% = &H64
var16% = SEG15sub35826%(word718E4%)
'
' How the problem2 Asmcode are converted ?
'
END SUB
Thanks fro your helping ~
Thanks~
Here is a program maked with QBasic7.1, I reverse it by IDA Pro5.6 and found following SUB:
SEG01sub11728 proc far ; CODE XREF: SEG27sub5741D+19A4P
var_16 = word ptr -16h
var_14 = word ptr -14h
mov cx, 4
mov bx, 0
call far ptr B$ENRD ; Allocate space on stack
;
call near ptr EventChk1
call B$LINA
mov ds:word718E2, 64h ; 'd'
call near ptr EventChk1
call B$LINA
push offset word718E2
call SEG15sub35826
mov [bp+var_14], ax
mov si, 5FCh
mov ax, [bp+var_14]
mov [si+54B4h], ax ; here is problem1
call near ptr EventChk1
call B$LINA
mov ds:word718E4, 64h ; 'd'
call near ptr EventChk1
call B$LINA
push offset word718E4
call SEG15sub35826
mov [bp+var_16], ax
xor si, si
mov ax, [bp+var_16]
mov [si+54B4h], ax ; here is problem2
call near ptr EventChk1
call B$LINA
call far ptr B$EXSA
retf 0
SEG01sub11728 endp
Convert it to following QBasic code:
SUB SEG01sub11728
word718E2% = &H64
var14% = SEG15sub35826%(word718E2%)
'
' How the problem1 Asmcode are converted ?
'
word718E4% = &H64
var16% = SEG15sub35826%(word718E4%)
'
' How the problem2 Asmcode are converted ?
'
END SUB
Thanks fro your helping ~