function MatchStrings(cStr:string;cMask:string):boolean; Var strlen, wclen,lenstr:Integer; Function MatchPattern(const cStr:string; strlen:Integer; const cMask:string; wclen:Integer): Integer; pascal; asm MOV EAX , 0 MOV DWORD [l2],EAX MOV EAX , [EBP + 20] SUB EAX , 1 MOV DWORD [PK],EAX MOV EAX , ESP SUB ESP , $F80 MOV EBP, DWORD [EAX+4] PUSH EBP MOV EBP, DWORD [EAX] PUSH EBP MOV EBP , EAX ADD EBP , $C PUSH EBX PUSH ESI PUSH EDI MOV EAX , -4[EBP] CALL @@WildCMPU LEA EBP , -4[EBP] MOV $0[EBP] , EAX POP EDI POP ESI POP EBX MOV EAX , ESP MOV ESP , EBP MOV EBP , [EAX] MOV EAX , 4[EAX] XCHG EAX , [ESP] RET @@DRMOVE: POP EDX MOV ESI , EAX @5530EB:db $FF,$74,$35,$FC SUB ESI , $4 JNE @5530EB ADD EBP , EAX MOV EAX , [EBP] LEA EBP , [EBP +4] JMP EDX @@RALLOT: POP EDX MOV ECX , EAX XOR EAX , EAX @553229:PUSH EAX DEC ECX JNE @553229 MOV EAX , [EBP] LEA EBP , [EBP +4] JMP EDX @@LocalsExit: POP EBX ADD ESP , EBX RET @@WildCMPU: MOV [EBP -4], EAX MOV EAX , $10 LEA EBP , [EBP -4] CALL @@DRMOVE MOV [EBP -4], EAX MOV EAX , $1 LEA EBP , [EBP -4] CALL @@RALLOT PUSH $14 PUSH OFFSET [@@LocalsExit] @574E04: db $81,$7C,$24,$0C,$01,$00,$00,$00 JGE @574E3F MOV ECX , [ESP +20] OR ECX , ECX JNE @574E1F MOV [EBP -4], EAX XOR EAX , EAX LEA EBP , [EBP -4] RET @574E1F:MOV [EBP -4], EAX MOV EAX , [ESP +24] MOVZX EAX , BYTE PTR [EAX ] MOV ECX , EAX AND ECX , $40 LEA EBP , [EBP -4] JNE @574E39 XOR EAX , EAX RET @574E39:MOV EAX , $FFFFFFFF RET @574E3F:MOV ECX , [ESP +20] OR ECX , ECX JNE @574E6F MOV [EBP -4], EAX MOV EAX , [ESP +16] MOVZX EAX , BYTE PTR [EAX ] CMP EAX , $2A MOV EAX , [EBP -4] JNE @574E63 db $FF,$44,$24,$10 db $FF,$4C,$24,$0C @574E63:MOV [EBP -4], EAX MOV EAX , $FFFFFFFF LEA EBP , [EBP -4] RET @574E6F:MOV [EBP -4], EAX MOV EAX , [ESP +16] MOVZX EAX , BYTE PTR [EAX ] db $FF,$44,$24,$10 db $FF,$4C,$24,$0C CMP EAX , $2A LEA EBP , [EBP -4] JNE @574F34 MOV EAX , [ESP +24] MOV [ESP +8], EAX MOV EAX , [ESP +12] OR EAX , EAX MOV EAX , [EBP ] LEA EBP , [EBP +4] JNE @574EC3 MOV [EBP -4], EAX MOV EAX , [ESP +24] SUB EAX , [PK] MOVEBX , DWORD [l2] MOV DWORD [DIMSTAR+EBX], EAX // ADD EBX, 4 MOV EAX , [ESP +20] MOV DWORD [DIMSTAR+EBX], EAX // ADD EBX, 4 MOVDWORD [l2],EBX XOR EAX , EAX LEA EBP , [EBP -4] RET @574EC3:XCHG EAX, EAX @574EC4:MOV [EBP -4], EAX MOV EAX , [ESP +24] MOV [EBP -8], EAX MOV EAX , [ESP +20] MOV [EBP -12], EAX MOV EAX , [ESP +16] MOV [EBP -16], EAX MOV EAX , [ESP +12] LEA EBP , [EBP -16] CALL @@WildCMPU OR EAX , EAX MOV EAX , [EBP ] LEA EBP , [EBP +4] JNE @574F14 MOV [EBP -4], EAX MOV EAX , [ESP +8] SUB EAX , [PK] MOVEBX , DWORD [l2] MOV DWORD [DIMSTAR+EBX], EAX // ADD EBX, 4 MOV EAX , [ESP +24] SUB EAX , [ESP +8] MOV DWORD [DIMSTAR+EBX], EAX // ADD EBX, 4 MOVDWORD [l2],EBX XOR EAX , EAX LEA EBP , [EBP -4] RET @574F14:MOV ECX , [ESP +20] OR ECX , ECX JNE @574F28 MOV [EBP -4], EAX MOV EAX , $FFFFFFFF LEA EBP , [EBP -4] RET @574F28:db $FF,$44,$24,$18 db $FF,$4C,$24,$14 JMP @574EC4 //JMP @574F74 @574F34:MOV [EBP -4], EAX MOV EAX , [ESP +24] MOVZX EAX , BYTE PTR [EAX ] CMP EAX , [EBP -4] LEA EBP , [EBP -4] JE @574F66 LEA EAX , [EAX +32] XOR EAX , [EBP ] MOV EAX , [EBP +4] LEA EBP , [EBP +8] JE @574F64 MOV [EBP -4], EAX MOV EAX , $1 LEA EBP , [EBP -4] RET @574F64:JMP @574F6C @574F66:MOV EAX , [EBP +4] LEA EBP , [EBP +8] @574F6C:db $FF,$44,$24,$18 db $FF,$4C,$24,$14 @574F74:JMP @574E04 RET end; Begin // Result := False; strlen:=lenGth(cStr); wclen:=lenGth(cMask); IF wclen >0 then IF MatchPattern(cStr, strlen,cMask,wclen)=0 then Result:=True else Result:= False else Result:= False End;