帮忙翻译一段代码(200)

  • 主题发起人 主题发起人 菜鸟黄
  • 开始时间 开始时间

菜鸟黄

Unregistered / Unconfirmed
GUEST, unregistred user!
unit SetParam;interfaceuses MMSystem, DSPack, DSUtil, DirectShow9;procedure SetFilterParam(Filter: TFilter);implementation function GetFilterPin(Filter: IBaseFilter; PinDirection: TPinDirection; Index: Integer = 1): IPin; var ppEnum: IEnumPins; ppPins: IPin; PinDirec: TPinDirection; Count: Integer; asm @@0: {stack frame start, has local variables} @@6: push ebx @@7: push esi @@8: push edi @@9: xor ebx, ebx @@11: mov [ebp-$08], ebx @@14: mov [ebp-$0C], ebx @@17: mov edi, ecx @@19: mov esi, edx @@21: mov [ebp-$04], eax @@24: mov eax, [ebp-$04] @@27: call System.@IntfAddRef @@32: {try} @@46: cmp dword ptr [ebp-$04], +$00 @@50: jz @@151 @@52: xor ebx, ebx @@54: lea eax, [ebp-$08] @@57: call System.@IntfClear @@62: push eax @@63: mov eax, [ebp-$04] @@66: push eax @@67: mov eax, [eax] @@69: call dword ptr [eax+$28] @@72: push $00 @@74: lea eax, [ebp-$0C] @@77: call System.@IntfClear @@82: push eax @@83: push $01 @@85: mov eax, [ebp-$08] @@88: push eax @@89: mov eax, [eax] @@91: call dword ptr [eax+$0C] @@94: cmp dword ptr [ebp-$0C], +$00 @@98: jz @@151 @@100: lea eax, [ebp-$10] @@103: push eax @@104: mov eax, [ebp-$0C] @@107: push eax @@108: mov eax, [eax] @@110: call dword ptr [eax+$24] @@113: cmp esi, [ebp-$10] @@116: jnz @@123 @@118: inc ebx @@119: cmp edi, ebx @@121: jle @@151 @@123: push $00 @@125: lea eax, [ebp-$0C] @@128: call System.@IntfClear @@133: push eax @@134: push $01 @@136: mov eax, [ebp-$08] @@139: push eax @@140: mov eax, [eax] @@142: call dword ptr [eax+$0C] @@145: cmp dword ptr [ebp-$0C], +$00 @@149: jnz @@100 @@151: mov eax, [ebp+$08] @@154: mov edx, [ebp-$0C] @@157: call System.@IntfCopy @@162: {finally} @@175: lea eax, [ebp-$0C] @@178: call System.@IntfClear @@183: lea eax, [ebp-$08] @@186: call System.@IntfClear @@191: lea eax, [ebp-$04] @@194: call System.@IntfClear @@199: {end; finally} @@207: pop edi @@208: pop esi @@209: pop ebx @@210: {stack frame end} end;procedure SetFilterParam(Filter: TFilter);var Pin: IPin; AMStreamConfig: IAMStreamConfig; ppmt: PAMMediaType; AMBufferNegotiation: IAMBufferNegotiation; AudioFormat: PWaveFormatEx; pprop: TAllocatorProperties;asm @@0: {stack frame start, has local variables} @@6: push ebx @@7: xor edx, edx @@9: mov [ebp-$28], edx @@12: mov [ebp-$2C], edx @@15: mov [ebp-$04], edx @@18: mov [ebp-$08], edx @@21: mov [ebp-$10], edx @@24: mov ebx, eax @@26: {try} @@40: lea eax, [ebp-$04] @@43: push eax @@44: lea eax, [ebp-$2C] @@47: mov edx, ebx @@49: test edx, edx @@51: jz @@56 @@53: sub edx, -$2C @@56: mov ecx, offset @@504 @@61: call System.@IntfCast @@66: mov eax, [ebp-$2C] @@69: lea edx, [ebp-$28] @@72: mov ecx, [eax] @@74: call dword ptr [ecx+$0C] @@77: mov eax, [ebp-$28] @@80: mov ecx, $00000001 @@85: mov edx, $00000001 @@90: call GetFilterPin @@95: cmp dword ptr [ebp-$04], +$00 @@99: jz @@435 @@105: lea eax, [ebp-$08] @@108: call System.@IntfClear @@113: push eax @@114: push offset @@520 @@119: mov eax, [ebp-$04] @@122: push eax @@123: mov eax, [eax] @@125: call dword ptr [eax] @@127: cmp dword ptr [ebp-$08], +$00 @@131: jz @@427 @@137: lea eax, [ebp-$0C] @@140: push eax @@141: mov eax, [ebp-$08] @@144: push eax @@145: mov eax, [eax] @@147: call dword ptr [eax+$10] @@150: test eax, eax @@152: jnz @@419 @@158: {try} @@172: mov eax, [ebp-$0C] @@175: mov eax, [eax+$44] @@178: mov [ebp-$14], eax @@181: mov eax, [ebp-$14] @@184: mov word ptr [eax+$02], $0001 @@190: mov eax, [ebp-$14] @@193: mov dword ptr [eax+$04], $00001F40 @@200: mov eax, [ebp-$14] @@203: mov dword ptr [eax+$08], $00003E80 @@210: mov eax, [ebp-$14] @@213: mov word ptr [eax+$0C], $0002 @@219: mov eax, [ebp-$14] @@222: mov word ptr [eax+$0E], $0010 @@228: mov eax, [ebp-$0C] @@231: push eax @@232: mov eax, [ebp-$08] @@235: push eax @@236: mov eax, [eax] @@238: call dword ptr [eax+$0C] @@241: lea eax, [ebp-$10] @@244: call System.@IntfClear @@249: push eax @@250: push offset @@536 @@255: mov eax, [ebp-$04] @@258: push eax @@259: mov eax, [eax] @@261: call dword ptr [eax] @@263: cmp dword ptr [ebp-$10], +$00 @@267: jz @@390 @@269: mov eax, [ebp-$14] @@272: movzx eax, word ptr [eax+$0E] @@276: mov [ebp-$30], eax @@279: fild dword ptr [ebp-$30] @@282: fdiv dword ptr SetFilterParam @@288: mov eax, [ebp-$14] @@291: mov eax, [eax+$04] @@294: mov [ebp-$38], eax @@297: xor eax, eax @@299: mov [ebp-$34], eax @@302: fild qword ptr [ebp-$38] @@305: fmulp st(1), st(0) @@307: fmul dword ptr SetFilterParam @@313: fld tbyte ptr SetFilterParam @@319: fmulp st(1), st(0) @@321: call System.@ROUND @@326: mov [ebp-$20], eax @@329: mov dword ptr [ebp-$24], $00000002 @@336: mov eax, [ebp-$14] @@339: movzx eax, word ptr [eax+$0E] @@343: mov [ebp-$30], eax @@346: fild dword ptr [ebp-$30] @@349: fdiv dword ptr SetFilterParam @@355: fmul dword ptr SetFilterParam @@361: call System.@ROUND @@366: mov [ebp-$1C], eax @@369: lea eax, [ebp-$24] @@372: push eax @@373: mov eax, [ebp-$10] @@376: push eax @@377: mov eax, [eax] @@379: call dword ptr [eax+$0C] @@382: lea eax, [ebp-$10] @@385: call System.@IntfClear @@390: {finally} @@403: mov eax, [ebp-$0C] @@406: call FreeMediaType @@411: {end; finally} @@419: lea eax, [ebp-$08] @@422: call System.@IntfClear @@427: lea eax, [ebp-$04] @@430: call System.@IntfClear @@435: {finally} @@448: lea eax, [ebp-$2C] @@451: call System.@IntfClear @@456: lea eax, [ebp-$28] @@459: call System.@IntfClear @@464: lea eax, [ebp-$10] @@467: call System.@IntfClear @@472: lea eax, [ebp-$08] @@475: call System.@IntfClear @@480: lea eax, [ebp-$04] @@483: call System.@IntfClear @@488: {end; finally} @@496: pop ebx @@497: {stack frame end} @@501: { 0: 00 00 00 DA 94 7F 88 E9 29 C6 44 B4 8E 1F BF 0F ...跀堥)艱磶.? 10: B5 98 78 40 33 E1 C6 AC 30 D0 11 A1 8C 00 A0 C9 禈x@3崞???.犐 20: 11 89 56 A0 71 ED 56 5F AF D0 11 B3 F0 00 AA 00 .塚爍鞻_?.仇.? 30: 37 61 C5 00 00 00 41 00 00 80 3F 0A D7 A3 70 3D 7a?..A..
 
你用DEDE反编译,得来的~~这个不好办啊~~
 
给你个提示,对了一遍,没有检查正确性;对照着delphi调试过程中的汇编码,就容易搞出代码了。function GetFilterPin(Filter: IBaseFilter; PinDirection: TPinDirection; Index: Integer = 1): IPin;var ppEnum: IEnumPins; //[ebp-$08] ppPins: IPin; //[ebp-$0C] PinDirec: TPinDirection; Count: Integer; // [ebp-$04] 是 Filter // esi 是 PinDirection // edi 是 Indexbegin if Filter <> nil then begin //@@54: lea eax, [ebp-$08] //@@57: call System.@IntfClear //@@62: push eax //@@63: mov eax, [ebp-$04] //@@66: push eax //@@67: mov eax, [eax] //@@69: call dword ptr [eax+$28] ppEnum := Filter.xxxxx;// 上面代码调用了Filter接口,缺乏接口声明 Count := 0; //@@72: push $00 //@@74: lea eax, [ebp-$0C] //@@77: call System.@IntfClear //@@82: push eax //@@83: push $01 //@@85: mov eax, [ebp-$08] //@@88: push eax //@@89: mov eax, [eax] //@@91: call dword ptr [eax+$0C] ppPins := ppEnum.xxxxx(1);// 上面代码调用了ppEnum接口,缺乏接口声明 while ppPins <> nil do begin PinDirec = ppPins.xxxx;// 上面代码调用了ppPins接口,缺乏接口声明 if PinDirec = PinDirection then begin Inc(Count); if Count > Index then Break; end else ppPins := ppEnum.xxxxx(1); end; end; Result := ppPins;end;
 

Similar threads

A
回复
0
查看
1K
Andreas Hausladen
A
I
回复
0
查看
814
import
I
I
回复
0
查看
854
import
I
I
回复
0
查看
751
import
I
I
回复
0
查看
706
import
I
后退
顶部