В ассемблере не очень понимаю, но нужно было дизассемблировать dll. Вот есть такой участок: Code (Text): text:10001049 fld [esp+0D0h+arg_C] text:10001050 fmul [esp+0D0h+arg_10] text:10001057 fstp [esp+0D0h+var_D0] text:1000105A fld [esp+0D0h+var_D0] Первая понятно, но вот что делает вторая строчка? Не пойму зачем здесь умножение. На С++ было написано следующий код: Code (Text): b1 = b; c1 = c;
Code (Text): extern "C" __declspec (dllexport) int CALLBACK MyFunc2( int a, char *str, char str2[100], float b, float c, double d, asd e ) { int a1; char str3[200],str4[200]; float b1, c1, z; double d1; asd e1; a1 = a; a1 = a1 * 2; d1 = d; d1 = d1 + 1; e1 = e; e1.a = e1.a + 1; a1 = d1 + e1.a; strcpy(str3,str); strcpy(str4, str2); b1 = b; c1 = c; z = b1 * c1; if(z > 0) return a1; else return (a1*-1); } Code (Text): .text:10001010 ; int __stdcall MyFunc2(int, int, int, float, float, double, int, int, int) .text:10001010 public _MyFunc2@40 .text:10001010 _MyFunc2@40 proc near .text:10001010 .text:10001010 var_D0 = dword ptr -0D0h .text:10001010 var_4 = dword ptr -4 .text:10001010 arg_4 = dword ptr 8 .text:10001010 arg_8 = dword ptr 0Ch .text:10001010 arg_C = dword ptr 10h .text:10001010 arg_10 = dword ptr 14h .text:10001010 arg_14 = qword ptr 18h .text:10001010 arg_1C = dword ptr 20h .text:10001010 .text:10001010 sub esp, 0D0h .text:10001016 mov eax, dword_10003000 .text:1000101B xor eax, esp .text:1000101D mov [esp+0D0h+var_4], eax .text:10001024 mov eax, [esp+0D0h+arg_1C] .text:1000102B add eax, 1 .text:1000102E mov [esp+0D0h+var_D0], eax .text:10001031 fild [esp+0D0h+var_D0] .text:10001034 push esi .text:10001035 fld [esp+0D4h+arg_14] .text:1000103C fadd ds:dbl_100020F8 .text:10001042 faddp st(1), st .text:10001044 call __ftol2_sse .text:10001049 mov esi, eax .text:1000104B mov eax, [esp+0D4h+arg_4] .text:10001052 .text:10001052 loc_10001052: ; CODE XREF: MyFunc2(x,x,x,x,x,x,x,x,x,x)+49j .text:10001052 mov cl, [eax] .text:10001054 add eax, 1 .text:10001057 test cl, cl .text:10001059 jnz short loc_10001052 .text:1000105B mov eax, [esp+0D4h+arg_8] .text:10001062 .text:10001062 loc_10001062: ; CODE XREF: MyFunc2(x,x,x,x,x,x,x,x,x,x)+59j .text:10001062 mov cl, [eax] .text:10001064 add eax, 1 .text:10001067 test cl, cl .text:10001069 jnz short loc_10001062 .text:1000106B fld [esp+0D4h+arg_C] .text:10001072 fmul [esp+0D4h+arg_10] .text:10001079 fstp [esp+0D4h+var_D0] .text:1000107D fld [esp+0D4h+var_D0] .text:10001081 fcomp ds:flt_100020F0 .text:10001087 fnstsw ax .text:10001089 test ah, 41h .text:1000108C mov eax, esi .text:1000108E jz short loc_10001092 .text:10001090 neg eax .text:10001092 .text:10001092 loc_10001092: ; CODE XREF: MyFunc2(x,x,x,x,x,x,x,x,x,x)+7Ej .text:10001092 mov ecx, [esp+0D4h+var_4] .text:10001099 pop esi .text:1000109A xor ecx, esp .text:1000109C call sub_10001523 .text:100010A1 add esp, 0D0h .text:100010A7 retn 28h .text:100010A7 _MyFunc2@40 endp
И чего удивительного? Вот их и перемножило. b1 и c1 более нигде не используются, так что и переменные компилятор не создал. Сразу перемножает аргументы, и сохраняет в z.