fork download
  1. 00C51002 in al,dx
  2. 00C51003 and esp,0FFFFFFC0h
  3. 00C51006 sub esp,0C0h
  4. 00C5100C mov eax,dword ptr [___security_cookie (0C53000h)]
  5. 00C51011 xor eax,esp
  6. 00C51013 mov dword ptr [esp+0BCh],eax
  7. int count = 16;
  8. __int64 inputs_hex[16] = {
  9. 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x1fedb1530240aa54,
  10. 00C5101A xor eax,eax
  11. 00C5101C mov dword ptr [esp+38h],eax
  12. 00C51020 mov dword ptr [esp+3Ch],eax
  13. 00C51024 mov dword ptr [esp+40h],eax
  14. 00C51028 mov dword ptr [esp+44h],eax
  15. 00C5102C mov dword ptr [esp+48h],eax
  16. 00C51030 mov dword ptr [esp+4Ch],eax
  17. 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x1ff0af0d95025bc3,
  18. 00C51034 mov dword ptr [esp+58h],eax
  19. 00C51038 mov dword ptr [esp+5Ch],eax
  20. 00C5103C mov dword ptr [esp+60h],eax
  21. 00C51040 mov dword ptr [esp+64h],eax
  22. 00C51044 mov dword ptr [esp+68h],eax
  23. 00C51048 mov dword ptr [esp+6Ch],eax
  24. 0x1fc9353df6af376b, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000,
  25. 00C5104C mov dword ptr [esp+80h],eax
  26. 00C51053 mov dword ptr [esp+84h],eax
  27. 00C5105A mov dword ptr [esp+88h],eax
  28. 00C51061 mov dword ptr [esp+8Ch],eax
  29. 00C51068 mov dword ptr [esp+90h],eax
  30. 00C5106F mov dword ptr [esp+94h],eax
  31. 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000
  32. 00C51076 mov dword ptr [esp+98h],eax
  33. 00C5107D mov dword ptr [esp+9Ch],eax
  34. 00C51084 mov dword ptr [esp+0A0h],eax
  35. 00C5108B mov dword ptr [esp+0A4h],eax
  36. 00C51092 mov dword ptr [esp+0A8h],eax
  37. 00C51099 mov dword ptr [esp+0ACh],eax
  38. };
  39. 00C510A0 mov dword ptr [esp+0B0h],eax
  40. 00C510A7 mov dword ptr [esp+0B4h],eax
  41. double* inputs = (double*)inputs_hex;
  42. double norm = calc_norm_and_regulate(count, inputs, false);
  43. 00C510AE lea eax,[esp+38h]
  44. 00C510B2 mov dword ptr [esp+50h],240AA54h
  45. 00C510BA mov dword ptr [esp+54h],1FEDB153h
  46. 00C510C2 mov dword ptr [esp+70h],95025BC3h
  47. 00C510CA mov dword ptr [esp+74h],1FF0AF0Dh
  48. 00C510D2 mov dword ptr [esp+78h],0F6AF376Bh
  49. 00C510DA mov dword ptr [esp+7Ch],1FC9353Dh
  50. 00C510E2 call calc_norm_and_regulate<double> (0C51130h)
  51. 00C510E7 fst qword ptr [esp+30h]
  52. fprintf(stdout, "[2]0x%016llX:%.19lg\n", *(uint64_t*)&norm, norm);
  53. 00C510EB mov eax,dword ptr [esp+34h]
  54. 00C510EF mov ecx,dword ptr [esp+30h]
  55. 00C510F3 sub esp,8
  56. 00C510F6 fstp qword ptr [esp]
  57. 00C510F9 push eax
  58. 00C510FA push ecx
  59. 00C510FB push offset string "[2]0x%016llX:%.19lg\n" (0C520F4h)
  60. 00C51100 call dword ptr [__imp____iob_func (0C5209Ch)]
  61. 00C51106 add eax,20h
  62. 00C51109 push eax
  63. 00C5110A call dword ptr [__imp__fprintf (0C520A4h)]
  64. return 0;
  65. }
  66. 00C51110 mov ecx,dword ptr [esp+0D4h]
  67. 00C51117 add esp,18h
  68. 00C5111A xor ecx,esp
  69. 00C5111C xor eax,eax
  70. 00C5111E call __security_check_cookie (0C511D5h)
  71. 00C51123 mov esp,ebp
  72. 00C51125 pop ebp
  73. 00C51126 ret
  74. --- ソース ファイルがありません -------------------------------------------------------------
  75. 00C51127 int 3
  76. 00C51128 int 3
  77. 00C51129 int 3
  78. 00C5112A int 3
  79. 00C5112B int 3
  80. 00C5112C int 3
  81. 00C5112D int 3
  82. 00C5112E int 3
  83. 00C5112F int 3
  84. --- c:\mingw\msys\1.0\home\root\double2\double2\double2.cpp --------------------
  85. #include "stdafx.h"
  86. #include <stdio.h>
  87. #include <stdint.h>
  88. #include <math.h>
  89.  
  90. template<typename T> static double calc_norm_and_regulate(int num, T* r, bool regulate){ // <float> for debug.
  91. 00C51130 push ebp
  92. 00C51131 mov ebp,esp
  93. 00C51133 sub esp,10h
  94. double norm = 0;
  95. 00C51136 fldz
  96. 00C51138 add eax,10h
  97. 00C5113B fstp qword ptr [norm]
  98. 00C5113E mov ecx,2
  99. 00C51143 jmp calc_norm_and_regulate<double>+17h (0C51147h)
  100. 00C51145 fstp st(0)
  101. for (int i = 0; i < num; i++) {
  102. norm += (double)r[i] * (double)r[i];
  103. 00C51147 fld qword ptr [eax-10h]
  104. 00C5114A add eax,40h
  105. 00C5114D dec ecx
  106. 00C5114E fld qword ptr [eax-48h]
  107. 00C51151 fld qword ptr [eax-40h]
  108. 00C51154 fld qword ptr [eax-38h]
  109. 00C51157 fld qword ptr [eax-30h]
  110. 00C5115A fld qword ptr [eax-28h]
  111. 00C5115D fld qword ptr [eax-20h]
  112. 00C51160 fld qword ptr [eax-18h]
  113. 00C51163 fstp qword ptr [ebp-10h]
  114. 00C51166 fld st(6)
  115. 00C51168 fmulp st(7),st
  116. 00C5116A fxch st(6)
  117. 00C5116C fadd qword ptr [norm]
  118. 00C5116F fld st(5)
  119. 00C51171 fmulp st(6),st
  120. 00C51173 faddp st(5),st
  121. 00C51175 fld st(3)
  122. 00C51177 fmulp st(4),st
  123. 00C51179 fxch st(4)
  124. 00C5117B faddp st(3),st
  125. 00C5117D fld st(1)
  126. 00C5117F fmulp st(2),st
  127. 00C51181 fxch st(2)
  128. 00C51183 faddp st(1),st
  129. 00C51185 fld st(1)
  130. 00C51187 fmulp st(2),st
  131. 00C51189 faddp st(1),st
  132. 00C5118B fld st(1)
  133. 00C5118D fmulp st(2),st
  134. 00C5118F faddp st(1),st
  135. 00C51191 fld st(1)
  136. 00C51193 fmulp st(2),st
  137. 00C51195 faddp st(1),st
  138. 00C51197 fld qword ptr [ebp-10h]
  139. 00C5119A fmul st(0),st
  140. 00C5119C faddp st(1),st
  141. 00C5119E fst qword ptr [norm]
  142. 00C511A1 jne calc_norm_and_regulate<double>+15h (0C51145h)
  143. // fprintf(stdout, "[0]0x%016llX:%.19lg\n", *(uint64_t*)&norm, norm);
  144. }
  145. fprintf(stdout, "[1]0x%016llX:%.19lg\n", *(uint64_t*)&norm, norm);
  146. 00C511A3 mov eax,dword ptr [ebp-4]
  147. 00C511A6 mov ecx,dword ptr [norm]
  148. 00C511A9 sub esp,8
  149. 00C511AC fstp qword ptr [esp]
  150. 00C511AF push eax
  151. 00C511B0 push ecx
  152. 00C511B1 push offset string "[1]0x%016llX:%.19lg\n" (0C5210Ch)
  153. 00C511B6 call dword ptr [__imp____iob_func (0C5209Ch)]
  154. 00C511BC add eax,20h
  155. 00C511BF push eax
  156. 00C511C0 call dword ptr [__imp__fprintf (0C520A4h)]
  157. norm = sqrt(norm);
  158. 00C511C6 fld qword ptr [norm]
  159. 00C511C9 add esp,18h
  160. 00C511CC call _CIsqrt (0C519D0h)
  161. if (regulate)
  162. for (int i=0;i<num;i++)
  163. r[i] = (T)(r[i]/norm);
  164. return norm;
  165. }
  166. 00C511D1 mov esp,ebp
  167. 00C511D3 pop ebp
  168. 00C511D4 ret
  169.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty