952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
|
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
|
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
|
stc
pop esi ecx
return
endp
proc StrCompFilename, .hName1, .hName2
.file1 rb 1024
.file2 rb 1024
.name dd ?
begin
pushad
stdcall StrLen, [.hName1]
mov ecx, eax
stdcall StrLen, [.hName2]
cmp eax, ecx
jne .not_equal
lea esi, [.file1]
lea edi, [.file2]
stdcall StrPtr, [.hName1]
lea edx, [.name]
invoke GetFullPathNameA, eax, 1024, esi, edx
cmp eax, 1023
ja .not_equal
test eax, eax
jz .not_equal
stdcall StrPtr, [.hName1]
mov esi, eax
mov ebx, eax
stdcall StrPtr, [.hName2]
mov edi, eax
lea edx, [.name]
invoke GetFullPathNameA, eax, 1024, edi, edx
cmp eax, 1023
ja .not_equal
test eax, eax
jz .not_equal
cmp eax, ebx
jne .not_equal
mov ecx, ebx
jecxz .equal
.loop:
mov al, [esi]
mov ah, [edi]
lea esi, [esi+1]
lea edi, [edi+1]
cmp al, '\'
jne @f
mov al, '/'
@@:
cmp ah, '\'
jne @f
mov ah, '/'
@@:
; cmp al, '\'
; jne @f
; mov al, '/'
;
;@@:
; cmp ah, '\'
; jne @f
; mov ah, '/'
;@@:
cmp al, $41
jb @f
cmp al, $5f
ja @f
add al, $20
@@:
cmp ah, $41
|