![]() | |
Re: Partial calculation Friday, 22-Jan-99 16:44:51
Here is part of the calculation routine: I will use "abc" as the input * Reference To: MSVBVM50.rtcAnsiValueBstr, Ord:0204h | :004132AB E82EDFFEFF Call 004011DE :004132B0 0FBFC0 movsx eax, ax .. moves the first letter 61 into eax :004132B3 898568FFFFFF mov dword ptr [ebp+FFFFFF68], eax :004132B9 8D4DD8 lea ecx, dword ptr [ebp-28] :004132BC DB8568FFFFFF fild dword ptr [ebp+FFFFFF68] Here it uses the decimal value of the letter "a" which is 97 :004132C2 DC4DE0 fmul qword ptr [ebp-20] .. 97 is multiplied by 2 :004132C5 DD5DE0 fstp qword ptr [ebp-20] ... and is stored = 194 < snip > .. :004132DE 03F3 add esi, ebx :004132E0 EB89 jmp 0041326B ...go for second, third, etc letter Our second letter which is h "62" is ansi 98 therefore 98 is multipliied with the result of the first letter (194) giving us 19012. Then our third letter is multiplied with this result h "63" = ansi 99 x 19012 = 1882188 * Referenced by a (U)nconditional or (C)onditional Jump at Address: |:0041326F(C) | :004132E2 DD45E0 fld qword ptr [ebp-20] . Load stored result from [ebp-20] =1882188 :004132E5 DC3558104000 fdiv qword ptr [00401058] Divide by 10 :004132EB FF75E8 push [ebp-18] :004132EE DD5DE0 fstp qword ptr [ebp-20] .Store = 188218.8 * Reference To: MSVBVM50.__vbaLenBstr, Ord:0000h | :004132F1 E8EEDEFEFF Call 004011E4 .. Get length of string = 3 :004132F6 69C09A020000 imul eax, 0000029A . multiply by 666 :004132FC 898564FFFFFF mov dword ptr [ebp+FFFFFF64], eax = 7CE (1998) :00413302 FF75E8 push [ebp-18] :00413305 DB8564FFFFFF fild dword ptr [ebp+FFFFFF64] .. Load 1998 :0041330B DC3560104000 fdiv qword ptr [00401060] ...Divide by 8 = 249.75 :00413311 DC3568104000 fdiv qword ptr [00401068] ...Divide by 60 = 4.1625 :00413317 DC2570104000 fsub qword ptr [00401070] .. Add 2 = 6.1625 :0041331D DC2578104000 fsub qword ptr [00401078] . Subtract .325 = 5.8375 :00413323 DD1D3C404100 fstp qword ptr [0041403C] Store result = 5.8375 :00413329 DD45E0 fld qword ptr [ebp-20] .. Load 188218.8 :0041332C DC3580104000 fdiv qword ptr [00401080] . Divide by 6780496716 = .000027758 :00413332 DC0D88104000 fmul qword ptr [00401088] Multiply by 3 = .000083276 :00413338 DD1D44404100 fstp qword ptr [00414044] . Store result .000083276 * Reference To: MSVBVM50.__vbaLenBstr, Ord:0000h | :0041333E E8A1DEFEFF Call 004011E4 .. Get length of string = 3 :00413343 69C04D010000 imul eax, 0000014D . multiply by 333 :00413349 898560FFFFFF mov dword ptr [ebp+FFFFFF60], eax = 3E7 (999) :0041334F DB8560FFFFFF fild dword ptr [ebp+FFFFFF60] .. Load 999 :00413355 DC3560104000 fdiv qword ptr [00401060] ...Divide by 8 = 124.875 :0041335B DC3568104000 fdiv qword ptr [00401068] . Divide by 60 = 2.08125 :00413361 DC2570104000 fsub qword ptr [00401070] . Add 2 = 4.08125 :00413367 DC2578104000 fsub qword ptr [00401078] . Subtract .375 = 3.75625 :0041336D DC2590104000 fsub qword ptr [00401090] Subtract .8375 = 2.91875 :00413373 DD1D4C404100 fstp qword ptr [0041404C] .Store result = 2.91875 :00413379 DD0544404100 fld qword ptr [00414044] Load .000083276 :0041337F DC1D98104000 fcomp qword ptr [00401098] . Compare with 72 :00413385 DFE0 fstsw ax .. store result of cmp in ax (120) :00413387 9E sahf set flags :00413388 7528 jne 004133B2 This seems to indicate that the calculations done on our name should equal 72 The other math done on the length of our input is used later perhaps as a second check to see if the input is the right length ( I don't know yet) Princess Princess |
Princess' Tread... (Princess) (20-Jan-99 22:35:29) |
|
Copyright © ProSoft 1997-1998
All rights reserved.