

4.46 new function

.text:04537700                      CheckShowGrid   proc near
.text:04537700 A1 54 4A 53 00                       mov     eax, lpGEndLBA64
.text:04537705 8B 50 04                             mov     edx, [eax+4]
.text:04537708 8B 00                                mov     eax, [eax]
.text:0453770A 8B 0D F8 4E 53 00                    mov     ecx, lpGBegLBA64
.text:04537710 2B 01                                sub     eax, [ecx]
.text:04537712 1B 52 04                             sbb     edx, [edx+4]
.text:04537715 85 D2                                test    edx, edx
.text:04537717 75 0D                                jnz     short loc_4537726   ; if (edx) goto @Grid_Dis
.text:04537719 3D 80 96 98 00                       cmp     eax, 10000000
.text:0453771E 73 06                                jnb     short loc_4537726   ; if (eax >= 10000000) goto @Grid_Dis
.text:04537720 A1 80 48 53 00                       mov     eax, lpAccessMode
.text:04537725 C3                                   retn
.text:04537726                      @Grid_Dis:
.text:04537726 A1 08 4A 53 00                       mov     eax, lpObjFm
.text:0453772B 8B 00                                mov     eax, [eax]
.text:0453772D 8B 80 F8 07 00 00                    mov     eax, [eax+7F8h] ; eax = objFm.DisGridChk    (TRzCheckBox)
.text:04537733 B2 00                                mov     dl, 0           ; state
.text:04537735 E8 4E 9B F6 FB                       call    RzCheckBox_SetState
.text:0453773A A1 80 48 53 00                       mov     eax, lpAccessMode
.text:0453773F C3                                   retn
.text:0453773F                      CheckShowGrid   endp



4.46 patched

.text:00523BB8 A1 C8 93 53 04                       mov     eax, objFm
.text:00523BBD 8B 80 CC 06 00 00                    mov     eax, [eax+6CCh]
.text:00523BC3 E8 3C FE F3 FF                       call    @Controls@TControl@GetText
.text:00523BC8 8B 45 D0                             mov     eax, [ebp+var_30]
.text:00523BCB E8 30 B2 FE FF                       call    xxStrToInt64
.text:00523BD0 8B 0D 54 4A 53 00                    mov     ecx, lpGEndLBA64
.text:00523BD6 89 01                                mov     [ecx], eax
.text:00523BD8 89 51 04                             mov     [ecx+4], edx          ; *lpGEndLBA64 = xxStrToInt64(str)
.text:00523BDB E8 20 3B 01 04                       call    CheckShowGrid         ; <----
.text:00523BE0 80 38 01                             cmp     byte ptr [eax], 1
.text:00523BE3 76 08                                jbe     short loc_523BED
.text:00523BE5 A1 B4 4C 53 00                       mov     eax, off_534CB4
.text:00523BEA C6 00 01                             mov     byte ptr [eax], 1


4.46 orig

.text:00523BB8 A1 C8 93 53 04                       mov     eax, objFm
.text:00523BBD 8B 80 CC 06 00 00                    mov     eax, [eax+6CCh]
.text:00523BC3 E8 3C FE F3 FF                       call    @Controls@TControl@GetText
.text:00523BC8 8B 45 D0                             mov     eax, [ebp+var_30]
.text:00523BCB E8 30 B2 FE FF                       call    xxStrToInt64
.text:00523BD0 8B 0D 54 4A 53 00                    mov     ecx, lpGEndLBA64
.text:00523BD6 89 01                                mov     [ecx], eax
.text:00523BD8 89 51 04                             mov     [ecx+4], edx          ; *lpGEndLBA64 = xxStrToInt64(str)
.text:00523BDB A1 80 48 53 00                       mov     eax, lpAccessMode     ; <----
.text:00523BE0 80 38 01                             cmp     byte ptr [eax], 1
.text:00523BE3 76 08                                jbe     short loc_523BED
.text:00523BE5 A1 B4 4C 53 00                       mov     eax, off_534CB4
.text:00523BEA C6 00 01                             mov     byte ptr [eax], 1



