---------------------------------------------------------------
[ENHANCED] VFP 9.0 FIX - DIR OR DISPLAY FILES COMMAND
January 2026
---------------------------------------------------------------
CCB
1. BUG:
In vfp9 (and vfp6, vfp7, vfp8), the DIR or DISPLAY FILES command can only display the file size < 2 GB,
now the DIR or DISPLAY FILES command can display the file size > 2 GB.
There is no the bug for the DIR or DISPLAY FILES command displaying the total number of bytes remaining on the disk.
2. CAUSE:
There are some BUGs in the following code.
3. RESOLUTION:
We can write some code to fix the BUG.
Fun710e4f :: ; proc near
push ebp ;0x00710e4f : 55
lea ebp , dword ptr [ esp + 0FFFFFB30h ] ;0x00710e50 : 8dac2430fbffff
;
; ----------------------------------------------------
; VFP 9.0 FIX - DIR OR DISPLAY FILES COMMAND
; November 2019
; ----------------------------------------------------
; CCB
;
; In vfp9, the DIR or DISPLAY FILES command can only display the file size < 2 GB,
; now the DIR or DISPLAY FILES command can display the file size > 2 GB.
;
; 2019/11/23, by ccb
;
; sub esp , 056Ch ;0x00710e57 : 81ec6c050000
sub esp , 057Ch ;0x00710e57 : 81ec6c050000
xor eax , eax
mov dword ptr [ ebp - 0ACh ][00h] , eax ;; [ ebp + 80 ], total filesize.
mov dword ptr [ ebp - 0ACh ][04h] , eax
mov dword ptr [ ebp - 0ACh ][08h] , eax ;; filesize.
mov dword ptr [ ebp - 0ACh ][0Ch] , eax
mov eax , dword ptr [ Data937090 ] ;0x00710e5d : a190709300
and dword ptr [ ebp + 124 ] , 00h ;0x00710e62 : 83657c00
push ebx ;0x00710e66 : 53
push esi ;0x00710e67 : 56
mov dword ptr [ ebp + 04CCh ] , eax ;0x00710e68 : 8985cc040000
push edi ;0x00710e6e : 57
xor eax , eax ;0x00710e6f : 33c0
mov ecx , 090h ;0x00710e71 : b990000000
lea edi , dword ptr [ ebp + 080h ] ;0x00710e76 : 8dbd80000000
rep stosd ;0x00710e7c : f3ab
mov eax , dword ptr [ Data9393ac ] ;0x00710e7e : a1ac939300
cmp byte ptr [eax] , 018h ;0x00710e83 : 803818
jne Label710e8e ;0x00710e86 : 7506
inc dword ptr [ Data9393ac ] ;0x00710e88 : ff05ac939300
Label710e8e ::
mov edx , dword ptr [ ebp + 04DCh ] ;0x00710e8e : 8b95dc040000
pushd 04h ;0x00710e94 : 6a04
lea ecx , dword ptr [ ebp + 03C8h ] ;0x00710e96 : 8d8dc8030000
call Fun42c19b ;0x00710e9c : e8fab2d1ff
mov eax , dword ptr [ Data9393ac ] ;0x00710ea1 : a1ac939300
cmp byte ptr [eax] , 0FCh ;0x00710ea6 : 8038fc
je Label710ed7 ;0x00710ea9 : 742c
lea esi , dword ptr [ ebp - 72 ] ;0x00710eab : 8d75b8
call Fun42107e ;0x00710eae : e8cb01d1ff
cmp al , 02h ;0x00710eb3 : 3c02
je Label710ed7 ;0x00710eb5 : 7420
cmp al , 0Ch ;0x00710eb7 : 3c0c
je Label710ed7 ;0x00710eb9 : 741c
pushd offset Data91fb38 ;0x00710ebb : 6838fb9100
mov ebx , 0100h ;0x00710ec0 : bb00010000
lea edi , dword ptr [ ebp + 03C8h ] ;0x00710ec5 : 8dbdc8030000
call Fun42e055 ;0x00710ecb : e885d1d1ff
xor edi , edi ;0x00710ed0 : 33ff
jmp Label710fb7 ;0x00710ed2 : e9e0000000
Label710ed7 ::
mov ebx , 0100h ;0x00710ed7 : bb00010000
mov edx , ebx ;0x00710edc : 8bd3
lea ecx , dword ptr [ ebp + 03C8h ] ;0x00710ede : 8d8dc8030000
call Fun41b81c ;0x00710ee4 : e833a9d0ff
mov edi , eax ;0x00710ee9 : 8bf8
mov eax , dword ptr [ Data9393ac ] ;0x00710eeb : a1ac939300
cmp byte ptr [eax] , 0FCh ;0x00710ef0 : 8038fc
jne Label710f39 ;0x00710ef3 : 7544
pushd 00h ;0x00710ef5 : 6a00
call Fun420bce ;0x00710ef7 : e8d2fcd0ff
mov esi , eax ;0x00710efc : 8bf0
cmp byte ptr [esi] , 048h ;0x00710efe : 803e48
je Label710f0d ;0x00710f01 : 740a
mov ecx , 0F0h ;0x00710f03 : b9f0000000
call Fun544742 ;0x00710f08 : e83538e3ff
Label710f0d ::
mov eax , ebx ;0x00710f0d : 8bc3
sub eax , edi ;0x00710f0f : 2bc7
cmp dword ptr [ esi + 8 ] , eax ;0x00710f11 : 394608
jb Label710f20 ;0x00710f14 : 720a
mov ecx , 0387h ;0x00710f16 : b987030000
call Fun544742 ;0x00710f1b : e82238e3ff
Label710f20 ::
mov eax , dword ptr [ esi + 32 ] ;0x00710f20 : 8b4620
push dword ptr [ esi + 8 ] ;0x00710f23 : ff7608
mov edx , dword ptr [eax] ;0x00710f26 : 8b10
lea ecx , dword ptr [ ebp + edi + 03C8h ] ;0x00710f28 : 8d8c3dc8030000
call Fun42c19b ;0x00710f2f : e867b2d1ff
mov eax , dword ptr [ esi + 8 ] ;0x00710f34 : 8b4608
jmp Label710f51 ;0x00710f37 : eb18
Label710f39 ::
movzx eax ,word ptr [ ebp - 70 ] ;0x00710f39 : 0fb745ba
mov edx , dword ptr [ ebp - 36 ] ;0x00710f3d : 8b55dc
push eax ;0x00710f40 : 50
lea ecx , dword ptr [ ebp + edi + 03C8h ] ;0x00710f41 : 8d8c3dc8030000
call Fun42c19b ;0x00710f48 : e84eb2d1ff
movzx eax ,word ptr [ ebp - 70 ] ;0x00710f4d : 0fb745ba
Label710f51 ::
add eax , edi ;0x00710f51 : 03c7
mov byte ptr [ ebp + eax + 03C8h ] , 00h ;0x00710f53 : c68405c803000000
lea eax , dword ptr [ ebp + 03C8h ] ;0x00710f5b : 8d85c8030000
pushd 05Ch ;0x00710f61 : 6a5c
push eax ;0x00710f63 : 50
call dword ptr [ Data9370d0 ] ;0x00710f64 : ff15d0709300
mov esi , eax ;0x00710f6a : 8bf0
xor edi , edi ;0x00710f6c : 33ff
cmp esi , edi ;0x00710f6e : 3bf7
pop ecx ;0x00710f70 : 59
pop ecx ;0x00710f71 : 59
jne Label710f7b ;0x00710f72 : 7507
lea esi , dword ptr [ ebp + 03C8h ] ;0x00710f74 : 8db5c8030000
dec esi ;0x00710f7a : 4e
Label710f7b ::
cmp byte ptr [ esi + 1 ] , 02Eh ;0x00710f7b : 807e012e
jne Label710fb7 ;0x00710f7f : 7536
mov edx , ebx ;0x00710f81 : 8bd3
lea ecx , dword ptr [ ebp + 03C8h ] ;0x00710f83 : 8d8dc8030000
call Fun41b81c ;0x00710f89 : e88ea8d0ff
inc eax ;0x00710f8e : 40
cmp eax , ebx ;0x00710f8f : 3bc3
jnb Label710fb7 ;0x00710f91 : 7324
mov edx , ebx ;0x00710f93 : 8bd3
lea ecx , dword ptr [ ebp + 03C8h ] ;0x00710f95 : 8d8dc8030000
call Fun41b81c ;0x00710f9b : e87ca8d0ff
lea eax , dword ptr [ ebp + eax + 03C8h ] ;0x00710fa0 : 8d8405c8030000
jmp Label710faf ;0x00710fa7 : eb06
Label710fa9 ::
mov cl , byte ptr [eax] ;0x00710fa9 : 8a08
mov byte ptr [ eax + 1 ] , cl ;0x00710fab : 884801
dec eax ;0x00710fae : 48
Label710faf ::
cmp eax , esi ;0x00710faf : 3bc6
ja Label710fa9 ;0x00710fb1 : 77f6
mov byte ptr [ eax + 1 ] , 02Ah ;0x00710fb3 : c640012a
Label710fb7 ::
mov edx , ebx ;0x00710fb7 : 8bd3
lea ecx , dword ptr [ ebp + 03C8h ] ;0x00710fb9 : 8d8dc8030000
call Fun41b81c ;0x00710fbf : e858a8d0ff
push eax ;0x00710fc4 : 50
lea eax , dword ptr [ ebp + 120 ] ;0x00710fc5 : 8d4578
push eax ;0x00710fc8 : 50
lea ecx , dword ptr [ ebp + 03C8h ] ;0x00710fc9 : 8d8dc8030000
call Fun434a5b ;0x00710fcf : e8873ad2ff
xor esi , esi ;0x00710fd4 : 33f6
inc esi ;0x00710fd6 : 46
push esi ;0x00710fd7 : 56
lea ecx , dword ptr [ ebp + 120 ] ;0x00710fd8 : 8d4d78
call Fun4b57a9 ;0x00710fdb : e8c947daff
test eax , eax ;0x00710fe0 : 85c0
je Label71100d ;0x00710fe2 : 7429
pushd offset Data920a98 ;0x00710fe4 : 68980a9200
lea eax , dword ptr [ ebp + 120 ] ;0x00710fe9 : 8d4578
push eax ;0x00710fec : 50
lea eax , dword ptr [ ebp + 02C0h ] ;0x00710fed : 8d85c0020000
push eax ;0x00710ff3 : 50
call Fun42c5c5 ;0x00710ff4 : e8ccb5d1ff
pushd offset Data919ea0 ;0x00710ff9 : 68a09e9100
lea eax , dword ptr [ ebp + 02C0h ] ;0x00710ffe : 8d85c0020000
push eax ;0x00711004 : 50
push eax ;0x00711005 : 50
call Fun42d3ac ;0x00711006 : e8a1c3d1ff
jmp Label711079 ;0x0071100b : eb6c
Label71100d ::
mov edx , ebx ;0x0071100d : 8bd3
lea ecx , dword ptr [ ebp + 03C8h ] ;0x0071100f : 8d8dc8030000
call Fun41b81c ;0x00711015 : e802a8d0ff
cmp eax , 02h ;0x0071101a : 83f802
jl Label711036 ;0x0071101d : 7c17
cmp byte ptr [ ebp + eax + 03C7h ] , 02Eh ;0x0071101f : 80bc05c70300002e
jne Label711036 ;0x00711027 : 750d
cmp byte ptr [ ebp + eax + 03C6h ] , 02Ah ;0x00711029 : 80bc05c60300002a
mov dword ptr [ ebp + 124 ] , esi ;0x00711031 : 89757c
je Label711039 ;0x00711034 : 7403
Label711036 ::
mov dword ptr [ ebp + 124 ] , edi ;0x00711036 : 897d7c
Label711039 ::
push edi ;0x00711039 : 57
push edi ;0x0071103a : 57
pushd offset Data919ea0 ;0x0071103b : 68a09e9100
push eax ;0x00711040 : 50
lea edx , dword ptr [ ebp + 03C8h ] ;0x00711041 : 8d95c8030000
lea ecx , dword ptr [ ebp + 02C0h ] ;0x00711047 : 8d8dc0020000
call Fun42cc34 ;0x0071104d : e8e2bbd1ff
lea eax , dword ptr [ ebp + 02C0h ] ;0x00711052 : 8d85c0020000
push eax ;0x00711058 : 50
lea eax , dword ptr [ ebp + 120 ] ;0x00711059 : 8d4578
push eax ;0x0071105c : 50
call Fun434bcf ;0x0071105d : e86d3bd2ff
push esi ;0x00711062 : 56
lea ecx , dword ptr [ ebp + 120 ] ;0x00711063 : 8d4d78
call Fun4b57a9 ;0x00711066 : e83e47daff
test eax , eax ;0x0071106b : 85c0
jne Label711079 ;0x0071106d : 750a
mov ecx , 0127h ;0x0071106f : b927010000
call Fun544742 ;0x00711074 : e8c936e3ff
Label711079 ::
push edi ;0x00711079 : 57
push ebx ;0x0071107a : 53
lea edx , dword ptr [ ebp + 03C8h ] ;0x0071107b : 8d95c8030000
lea ecx , dword ptr [ ebp + 02C0h ] ;0x00711081 : 8d8dc0020000
call Fun43d389 ;0x00711087 : e8fdc2d2ff
cmp dword ptr [ ebp + 124 ] , edi ;0x0071108c : 397d7c
je Label7110a1 ;0x0071108f : 7410
pushd offset Data91ec18 ;0x00711091 : 6818ec9100
lea edi , dword ptr [ ebp + 03C8h ] ;0x00711096 : 8dbdc8030000
call Fun42e055 ;0x0071109c : e8b4cfd1ff
Label7110a1 ::
mov esi , 0105h ;0x007110a1 : be05010000
lea ecx , dword ptr [ ebp + 03C8h ] ;0x007110a6 : 8d8dc8030000
mov edx , esi ;0x007110ac : 8bd6
lea eax , dword ptr [ ebp + 080h ] ;0x007110ae : 8d8580000000
call Fun42c33e ;0x007110b4 : e885b2d1ff
xor eax , eax ;0x007110b9 : 33c0
pushd 01Eh ;0x007110bb : 6a1e
pop ecx ;0x007110bd : 59
lea edi , dword ptr [ ebp - 16 ] ;0x007110be : 8d7df0
rep stosd ;0x007110c1 : f3ab
mov edi , dword ptr [ Data937fb4 ] ;0x007110c3 : 8b3db47f9300
lea eax , dword ptr [ ebp + 080h ] ;0x007110c9 : 8d8580000000
mov dword ptr [ ebp + 64 ] , eax ;0x007110cf : 894540
mov ax , word ptr [ ebp + 04D8h ] ;0x007110d2 : 668b85d8040000
mov word ptr [ ebp + 102 ] , ax ;0x007110d9 : 66894566
lea eax , dword ptr [ ebp + 120 ] ;0x007110dd : 8d4578
mov dword ptr [ ebp + 76 ] , eax ;0x007110e0 : 89454c
mov eax , edi ;0x007110e3 : 8bc7
mov dword ptr [ ebp - 16 ] , offset Label7109a9 ;0x007110e5 : c745f0a9097100
mov dword ptr [ ebp + 8 ] , 0240h ;0x007110ec : c7450840020000
mov dword ptr [ ebp + 12 ] , 03E8h ;0x007110f3 : c7450ce8030000
mov dword ptr [ ebp + 0 ] , 0128h ;0x007110fa : c7450028010000
mov dword ptr [ ebp + 4 ] , esi ;0x00711101 : 897504
call Fun42f5d1 ;0x00711104 : e8c8e4d1ff
mov eax , dword ptr [eax] ;0x00711109 : 8b00
mov ax , word ptr [ eax + 0162h ] ;0x0071110b : 668b8062010000
movsx ecx , ax ;0x00711112 : 0fbfc8
mov word ptr [ ebp + 100 ] , ax ;0x00711115 : 66894564
mov edi , dword ptr [edi] ;0x00711119 : 8b3f
mov eax , ecx ;0x0071111b : 8bc1
cdq ;0x0071111d : 99
sub eax , edx ;0x0071111e : 2bc2
sar eax , 1 ;0x00711120 : d1f8
add eax , dword ptr [ edi + 094h ] ;0x00711122 : 038794000000
mov edi , SetErrorMode ;0x00711128 : 8b3d04719100
cdq ;0x0071112e : 99
idiv ecx ;0x0071112f : f7f9
pushd 08001h ;0x00711131 : 6801800000
mov word ptr [ ebp + 100 ] , ax ;0x00711136 : 66894564
call edi ;0x0071113a : ffd7
mov esi , eax ;0x0071113c : 8bf0
xor ebx , ebx ;0x0071113e : 33db
push ebx ;0x00711140 : 53
lea eax , dword ptr [ ebp + 080h ] ;0x00711141 : 8d8580000000
push eax ;0x00711147 : 50
call Fun42c953 ;0x00711148 : e806b8d1ff
push esi ;0x0071114d : 56
mov dword ptr [ ebp + 68 ] , eax ;0x0071114e : 894544
call edi ;0x00711151 : ffd7
pushd 02h ;0x00711153 : 6a02
pop eax ;0x00711155 : 58
cmp dword ptr [ ebp + 68 ] , eax ;0x00711156 : 394544
je Label711331 ;0x00711159 : 0f84d2010000
lea edx , dword ptr [ ebp + 112 ] ;0x0071115f : 8d5570
lea eax , dword ptr [ ebp + 0FFFFFF68h ] ;0x00711162 : 8d8568ffffff
call Fun42c27f ;0x00711168 : e812b1d1ff
push ebx ;0x0071116d : 53
push eax ;0x0071116e : 50
call Fun42c2be ;0x0071116f : e84ab1d1ff
cmp eax , ebx ;0x00711174 : 3bc3
pop ecx ;0x00711176 : 59
pop ecx ;0x00711177 : 59
mov dword ptr [ ebp + 124 ] , eax ;0x00711178 : 89457c
jne Label711320 ;0x0071117b : 0f859f010000
call Fun90d7b3 ;0x00711181 : e82dc61f00
push ebx ;0x00711186 : 53
pushd 01h ;0x00711187 : 6a01
lea eax , dword ptr [ ebp + 108 ] ;0x00711189 : 8d456c
call Fun90d6c4 ;0x0071118c : e833c51f00
mov edi , offset Data919ea0 ;0x00711191 : bfa09e9100
lea esi , dword ptr [ ebp + 02C0h ] ;0x00711196 : 8db5c0020000
call Fun41eb95 ;0x0071119c : e8f4d9d0ff
test eax , eax ;0x007111a1 : 85c0
je Label71123d ;0x007111a3 : 0f8494000000
push ebx ;0x007111a9 : 53
call Fun762d37 ;0x007111aa : e8881b0500
xor esi , esi ;0x007111af : 33f6
inc esi ;0x007111b1 : 46
push esi ;0x007111b2 : 56
call Fun54054d ;0x007111b3 : e895f3e2ff
movsx eax ,word ptr [ Data945730 ] ;0x007111b8 : 0fbf0530579400
push eax ;0x007111bf : 50
push ebx ;0x007111c0 : 53
mov ecx , 0804h ;0x007111c1 : b904080000
call Fun42c583 ;0x007111c6 : e8b8b3d1ff
push eax ;0x007111cb : 50
call Fun710911 ;0x007111cc : e840f7ffff
movsx eax ,word ptr [ Data945730 ] ;0x007111d1 : 0fbf0530579400
pushd 09h ;0x007111d8 : 6a09
push eax ;0x007111da : 50
mov ecx , 0877h ;0x007111db : b977080000
call Fun42c583 ;0x007111e0 : e89eb3d1ff
push eax ;0x007111e5 : 50
call Fun71095c ;0x007111e6 : e871f7ffff
movsx eax ,word ptr [ Data945730 ] ;0x007111eb : 0fbf0530579400
pushd 0Bh ;0x007111f2 : 6a0b
add eax , 0Bh ;0x007111f4 : 83c00b
push eax ;0x007111f7 : 50
mov ecx , 0878h ;0x007111f8 : b978080000
call Fun42c583 ;0x007111fd : e881b3d1ff
push eax ;0x00711202 : 50
call Fun71095c ;0x00711203 : e854f7ffff
;
; ----------------------------------------------------
; VFP 9.0 FIX - DIR OR DISPLAY FILES COMMAND
; November 2019
; ----------------------------------------------------
; CCB
;
; In vfp9, the DIR or DISPLAY FILES command can only display the file size < 2 GB,
; now the DIR or DISPLAY FILES command can display the file size > 2 GB.
;
; 2019/11/23, by ccb
;
; movsx eax ,word ptr [ Data945730 ] ;0x00711208 : 0fbf0530579400
; pushd 0Ch ;0x0071120f : 6a0c
; add eax , 016h ;0x00711211 : 83c016
; push eax ;0x00711214 : 50
; mov ecx , 0879h ;0x00711215 : b979080000
; call Fun42c583 ;0x0071121a : e864b3d1ff
; push eax ;0x0071121f : 50
; call Fun71095c ;0x00711220 : e837f7ffff
movsx eax ,word ptr [ Data945730 ] ;0x00711208 : 0fbf0530579400
pushd 010h ;0x0071120f : 6a0c
add eax , 016h ;0x00711211 : 83c016
push eax ;0x00711214 : 50
mov ecx , 0879h ;0x00711215 : b979080000
call Fun42c583 ;0x0071121a : e864b3d1ff
push eax ;0x0071121f : 50
call Fun71095c ;0x00711220 : e837f7ffff
push dword ptr [ ebp + 04D8h ] ;0x00711225 : ffb5d8040000
lea eax , dword ptr [ ebp + 108 ] ;0x0071122b : 8d456c
push esi ;0x0071122e : 56
mov dword ptr [ ebp - 12 ] , offset Label710b3c ;0x0071122f : c745f43c0b7100
call Fun90d6c4 ;0x00711236 : e889c41f00
jmp Label7112a5 ;0x0071123b : eb68
Label71123d ::
mov esi , dword ptr [ Data937fb4 ] ;0x0071123d : 8b35b47f9300
lea eax , dword ptr [ ebp - 32 ] ;0x00711243 : 8d45e0
mov edx , esi ;0x00711246 : 8bd6
call Fun42e782 ;0x00711248 : e835d5d1ff
mov eax , esi ;0x0071124d : 8bc6
call Fun42f5d1 ;0x0071124f : e87de3d1ff
mov eax , dword ptr [eax] ;0x00711254 : 8b00
movzx eax ,word ptr [ eax + 0160h ] ;0x00711256 : 0fb78060010000
mov dword ptr [ ebp + 116 ] , eax ;0x0071125d : 894574
fild dword ptr [ ebp + 116 ] ;0x00711260 : db4574
fmul qword ptr [ Data945728 ] ;0x00711263 : dc0d28579400
fmul qword ptr [ Data92b6a8 ] ;0x00711269 : dc0da8b69200
call Fun4337e6 ;0x0071126f : e87225d2ff
mov dword ptr [ ebp + 88 ] , eax ;0x00711274 : 894558
mov eax , dword ptr [ ebp - 24 ] ;0x00711277 : 8b45e8
sub eax , dword ptr [ ebp - 32 ] ;0x0071127a : 2b45e0
mov dword ptr [ ebp + 116 ] , eax ;0x0071127d : 894574
fild dword ptr [ ebp + 116 ] ;0x00711280 : db4574
fidiv dword ptr [ ebp + 88 ] ;0x00711283 : da7558
call Fun4337e6 ;0x00711286 : e85b25d2ff
xor ecx , ecx ;0x0071128b : 33c9
inc ecx ;0x0071128d : 41
cmp eax , ecx ;0x0071128e : 3bc1
mov dword ptr [ ebp + 92 ] , eax ;0x00711290 : 89455c
jg Label711298 ;0x00711293 : 7f03
mov dword ptr [ ebp + 92 ] , ecx ;0x00711295 : 894d5c
Label711298 ::
xor esi , esi ;0x00711298 : 33f6
mov dword ptr [ ebp + 96 ] , ebx ;0x0071129a : 895d60
mov dword ptr [ ebp - 12 ] , offset Label7109d6 ;0x0071129d : c745f4d6097100
inc esi ;0x007112a4 : 46
Label7112a5 ::
;
; ----------------------------------------------------
; VFP 9.0 FIX - DIR OR DISPLAY FILES COMMAND
; November 2019
; ----------------------------------------------------
; CCB
;
; In vfp9, the DIR or DISPLAY FILES command can only display the file size < 2 GB,
; now the DIR or DISPLAY FILES command can display the file size > 2 GB.
;
; 2019/11/23, by ccb
;
; mov dword ptr vfpa_dir_isdir,01h
lea ecx , dword ptr [ ebp - 16 ] ;0x007112a5 : 8d4df0
call Fun41ea8e ;0x007112a8 : e8e1d7d0ff
;
; ----------------------------------------------------
; VFP 9.0 FIX - DIR OR DISPLAY FILES COMMAND
; November 2019
; ----------------------------------------------------
; CCB
;
; In vfp9, the DIR or DISPLAY FILES command can only display the file size < 2 GB,
; now the DIR or DISPLAY FILES command can display the file size > 2 GB.
;
; 2019/11/23, by ccb
;
Label7112ac ::
; mov dword ptr vfpa_dir_isdir,00h
Label7112ad ::
cmp dword ptr [ ebp + 84 ] , ebx ;0x007112ad : 395d54
jne Label7112c9 ;0x007112b0 : 7517
push esi ;0x007112b2 : 56
call Fun54054d ;0x007112b3 : e895f2e2ff
mov ecx , 0808h ;0x007112b8 : b908080000
call Fun42c583 ;0x007112bd : e8c1b2d1ff
push eax ;0x007112c2 : 50
call Fun539df5 ;0x007112c3 : e82d8be2ff
pop ecx ;0x007112c8 : 59
Label7112c9 ::
cmp dword ptr [ ebp + 72 ] , ebx ;0x007112c9 : 395d48
jne Label711320 ;0x007112cc : 7552
push esi ;0x007112ce : 56
call Fun54054d ;0x007112cf : e879f2e2ff
push esi ;0x007112d4 : 56
call Fun54054d ;0x007112d5 : e873f2e2ff
;
; ----------------------------------------------------
; VFP 9.0 FIX - DIR OR DISPLAY FILES COMMAND
; November 2019
; ----------------------------------------------------
; CCB
;
; In vfp9, the DIR or DISPLAY FILES command can only display the file size < 2 GB,
; now the DIR or DISPLAY FILES command can display the file size > 2 GB.
;
; 2019/11/23, by ccb
;
; [ ebp - 0ACh ][00h]: total filesize.
; push dword ptr [ ebp + 84 ] ;0x007112da : ff7554
; mov ecx , 0809h ;0x007112dd : b909080000
; push dword ptr [ ebp + 80 ] ;0x007112e2 : ff7550
; call Fun42c583 ;0x007112e5 : e899b2d1ff
; push eax ;0x007112ea : 50
; call Fun539df5 ;0x007112eb : e8058be2ff
; add esp , 0Ch ;0x007112f0 : 83c40c
push dword ptr [ ebp + 84 ] ;0x007112da : ff7554
push ecx
push ecx
fild qword ptr [ ebp - 0ACh ][00h]
fstp qword ptr [ esp ]
mov ecx , 0809h ;0x007112dd : b909080000
call Fun42c583 ;0x007112e5 : e899b2d1ff
; %9ld byte%{,s} in %d file%{,s}.
; --> %.0f byte%{,s} in %d file%{,s}.
Label7112ea_start0 ::
cmp byte ptr [eax][0],"%"
jne Label7112ea_start1
; cmp byte ptr [eax][1],"9"
; jne Label7112ea_start1
cmp byte ptr [eax][2],"l"
jne Label7112ea_start1
cmp byte ptr [eax][3],"d"
jne Label7112ea_start1
mov byte ptr [eax][0],"%"
mov byte ptr [eax][1],"."
mov byte ptr [eax][2],"0"
mov byte ptr [eax][3],"f"
jmp Label7112ea
Label7112ea_start1 ::
cmp byte ptr [eax][1][0],"%"
jne Label7112ea_start2
; cmp byte ptr [eax][1][1],"9"
; jne Label7112ea_start2
cmp byte ptr [eax][1][2],"l"
jne Label7112ea_start2
cmp byte ptr [eax][1][3],"d"
jne Label7112ea_start2
mov byte ptr [eax][1][0],"%"
mov byte ptr [eax][1][1],"."
mov byte ptr [eax][1][2],"0"
mov byte ptr [eax][1][3],"f"
jmp Label7112ea
Label7112ea_start2 ::
cmp byte ptr [eax][2][0],"%"
jne Label7112ea_start3
; cmp byte ptr [eax][2][1],"9"
; jne Label7112ea_start3
cmp byte ptr [eax][2][2],"l"
jne Label7112ea_start3
cmp byte ptr [eax][2][3],"d"
jne Label7112ea_start3
mov byte ptr [eax][2][0],"%"
mov byte ptr [eax][2][1],"."
mov byte ptr [eax][2][2],"0"
mov byte ptr [eax][2][3],"f"
jmp Label7112ea
Label7112ea_start3 ::
cmp byte ptr [eax][3][0],"%"
jne Label7112ea_start4
; cmp byte ptr [eax][3][1],"9"
; jne Label7112ea_start4
cmp byte ptr [eax][3][2],"l"
jne Label7112ea_start4
cmp byte ptr [eax][3][3],"d"
jne Label7112ea_start4
mov byte ptr [eax][3][0],"%"
mov byte ptr [eax][3][1],"."
mov byte ptr [eax][3][2],"0"
mov byte ptr [eax][3][3],"f"
jmp Label7112ea
Label7112ea_start4 ::
cmp byte ptr [eax][4][0],"%"
jne Label7112ea_start5
; cmp byte ptr [eax][4][1],"9"
; jne Label7112ea_start5
cmp byte ptr [eax][4][2],"l"
jne Label7112ea_start5
cmp byte ptr [eax][4][3],"d"
jne Label7112ea_start5
mov byte ptr [eax][4][0],"%"
mov byte ptr [eax][4][1],"."
mov byte ptr [eax][4][2],"0"
mov byte ptr [eax][4][3],"f"
jmp Label7112ea
Label7112ea_start5 ::
cmp byte ptr [eax][5][0],"%"
jne Label7112ea_start6
; cmp byte ptr [eax][5][1],"9"
; jne Label7112ea_start6
cmp byte ptr [eax][5][2],"l"
jne Label7112ea_start6
cmp byte ptr [eax][5][3],"d"
jne Label7112ea_start6
mov byte ptr [eax][5][0],"%"
mov byte ptr [eax][5][1],"."
mov byte ptr [eax][5][2],"0"
mov byte ptr [eax][5][3],"f"
jmp Label7112ea
Label7112ea_start6 ::
cmp byte ptr [eax][6][0],"%"
jne Label7112ea_start7
; cmp byte ptr [eax][6][1],"9"
; jne Label7112ea_start7
cmp byte ptr [eax][6][2],"l"
jne Label7112ea_start7
cmp byte ptr [eax][6][3],"d"
jne Label7112ea_start7
mov byte ptr [eax][6][0],"%"
mov byte ptr [eax][6][1],"."
mov byte ptr [eax][6][2],"0"
mov byte ptr [eax][6][3],"f"
jmp Label7112ea
Label7112ea_start7 ::
cmp byte ptr [eax][7][0],"%"
jne Label7112ea_start8
; cmp byte ptr [eax][7][1],"9"
; jne Label7112ea_start8
cmp byte ptr [eax][7][2],"l"
jne Label7112ea_start8
cmp byte ptr [eax][7][3],"d"
jne Label7112ea_start8
mov byte ptr [eax][7][0],"%"
mov byte ptr [eax][7][1],"."
mov byte ptr [eax][7][2],"0"
mov byte ptr [eax][7][3],"f"
jmp Label7112ea
Label7112ea_start8 ::
pop ecx
pop ecx
push dword ptr [ ebp - 0ACh ][00h] ;0x007112e2 : ff7550
mov ecx , 0809h ;0x007112dd : b909080000
call Fun42c583 ;0x007112e5 : e899b2d1ff
push eax ;0x007112ea : 50
call Fun539df5 ;0x007112eb : e8058be2ff
add esp , 0Ch ;0x007112f0 : 83c40c
jmp Label7112f3
Label7112ea ::
push eax ;0x007112ea : 50
call Fun539df5 ;0x007112eb : e8058be2ff
add esp , 010h ;0x007112f0 : 83c40c
Label7112f3 ::
push esi ;0x007112f3 : 56
call Fun54054d ;0x007112f4 : e854f2e2ff
push ebx ;0x007112f9 : 53
lea ecx , dword ptr [ ebp + 120 ] ;0x007112fa : 8d4d78
call Fun75f07a ;0x007112fd : e878dd0400
push ecx ;0x00711302 : 51
push ecx ;0x00711303 : 51
mov ecx , 080Ah ;0x00711304 : b90a080000
fstp qword ptr [ esp ] ;0x00711309 : dd1c24
call Fun42c583 ;0x0071130c : e872b2d1ff
push eax ;0x00711311 : 50
call Fun539df5 ;0x00711312 : e8de8ae2ff
add esp , 0Ch ;0x00711317 : 83c40c
push esi ;0x0071131a : 56
call Fun54054d ;0x0071131b : e82df2e2ff
Label711320 ::
lea eax , dword ptr [ ebp + 112 ] ;0x00711320 : 8d4570
push eax ;0x00711323 : 50
lea eax , dword ptr [ ebp + 0FFFFFF68h ] ;0x00711324 : 8d8568ffffff
call Fun42d200 ;0x0071132a : e8d1bed1ff
jmp Label711334 ;0x0071132f : eb03
Label711331 ::
mov dword ptr [ ebp + 124 ] , eax ;0x00711331 : 89457c
Label711334 ::
lea esi , dword ptr [ ebp + 080h ] ;0x00711334 : 8db580000000
call Fun43e393 ;0x0071133a : e854d0d2ff
mov ecx , dword ptr [ ebp + 124 ] ;0x0071133f : 8b4d7c
cmp ecx , ebx ;0x00711342 : 3bcb
je Label71134b ;0x00711344 : 7405
call Fun544742 ;0x00711346 : e8f733e3ff
Label71134b ::
mov ecx , dword ptr [ ebp + 04CCh ] ;0x0071134b : 8b8dcc040000
call Fun42bf1d ;0x00711351 : e8c7abd1ff
pop edi ;0x00711356 : 5f
pop esi ;0x00711357 : 5e
pop ebx ;0x00711358 : 5b
add ebp , 04D0h ;0x00711359 : 81c5d0040000
leave ;0x0071135f : c9
ret 08h ;0x00711360 : c20800
4. APPLIES TO:
VFP 6.0.8167.0
VFP 6.0.8961.0 (SP5)
VFP 7.0.0.9262
VFP 7.0.0.9465 (SP1)
VFP 8.0.0.2521
VFP 8.0.0.3117 (SP1)
VFP 9.0.0.2412
VFP 9.0.0.3504 (SP1)
VFP 9.0.0.4611 (SP2)
VFP 9.0.0.5015 (SP2)
VFP 9.0.0.5411 (SP2)
VFP 9.0.0.5721 (SP2)
VFP 9.0.0.5815 (SP2)
VFP 9.0.0.6303 (SP2)
VFP 9.0.0.6602 (SP2)
VFP 9.0.0.7423 (SP2)
The bug has been fixed in VFP Advanced.
5. REFERENCE WEBSITES:
1, baiyujia.com:
http://www.baiyujia.com
http://www.baiyujia.com/vfpdocuments/f_vfp9fix198.asp
6. OTHER:
For reference only, there is no guarantees.
Any questions or suggestions, please send me an email at ccb2000@163.com.
|