DHAMP.b 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. /*
  2. * Input file : test\dhamp.exe
  3. * File type : EXE
  4. */
  5. #include "dcc.h"
  6. int proc_2 (long arg0, long arg1)
  7. /* Takes 8 bytes of parameters.
  8. * High-level language prologue code.
  9. * C calling convention.
  10. */
  11. {
  12. char loc1; /* al */
  13. int loc2; /* bx */
  14. do {
  15. arg0 = (arg0 + 1);
  16. loc1 = es[bx];
  17. arg1 = (arg1 + 1);
  18. es[bx] = loc1;
  19. } while ((loc1 != 0));
  20. return (loc2);
  21. }
  22. int proc_3 (long arg0, long arg1)
  23. /* Takes 8 bytes of parameters.
  24. * High-level language prologue code.
  25. * C calling convention.
  26. */
  27. {
  28. int loc1; /* ax */
  29. while ((es[bx] == es[bx])) {
  30. if (es[bx] == 0) {
  31. loc1 = 0;
  32. return (loc1);
  33. }
  34. else {
  35. arg0 = (arg0 + 1);
  36. arg1 = (arg1 + 1);
  37. }
  38. }
  39. loc1 = (es[bx] - es[bx]);
  40. }
  41. int proc_1 (int arg0, int arg1, int arg2, int arg3)
  42. /* Takes 8 bytes of parameters.
  43. * High-level language prologue code.
  44. * C calling convention.
  45. */
  46. {
  47. int loc1;
  48. int loc2;
  49. loc1 = 0;
  50. loc2 = 0;
  51. while ((loc1 < 0x2328)) {
  52. proc_2 (arg1, arg0, 311);
  53. proc_2 (arg3, arg2, 328);
  54. loc2 = (loc2 + proc_3 (arg1, arg0, arg3, arg2));
  55. loc1 = (loc1 + 1);
  56. }
  57. return (loc2);
  58. }
  59. int proc_4 ()
  60. /* Takes no parameters.
  61. * High-level language prologue code.
  62. */
  63. {
  64. int loc1;
  65. int loc2;
  66. int loc3;
  67. int loc4;
  68. loc3 = 0;
  69. while ((loc3 < 0x3E8)) {
  70. loc1 = 0;
  71. loc4 = 0;
  72. loc2 = 1;
  73. while ((loc4 < 179)) {
  74. loc1 = (loc1 + loc2);
  75. loc2 = (loc2 + 2);
  76. loc4 = (loc4 + 1);
  77. }
  78. loc3 = (loc3 + 1);
  79. }
  80. return (loc1);
  81. }
  82. int proc_5 (int arg0)
  83. /* Takes 2 bytes of parameters.
  84. * High-level language prologue code.
  85. * C calling convention.
  86. */
  87. {
  88. int loc1;
  89. int loc2; /* ax */
  90. loc1 = arg0;
  91. if (loc1 > 2) {
  92. loc2 = (proc_5 ((loc1 - 1)) + proc_5 ((loc1 + 0xFFFE)));
  93. }
  94. else {
  95. loc2 = 1;
  96. }
  97. return (loc2);
  98. }
  99. long proc_6 (int arg0, int arg1)
  100. /* Takes 4 bytes of parameters.
  101. * High-level language prologue code.
  102. * C calling convention.
  103. */
  104. {
  105. int loc1;
  106. long loc2;
  107. if ((arg0 | arg1) == 0) {
  108. loc1 = 0;
  109. while ((loc1 < 0x2328)) {
  110. loc2 = (loc2 + [-862954250]);
  111. [-862954250] = ([-862954250] + 2);
  112. loc1 = (loc1 + 1);
  113. }
  114. }
  115. else {
  116. loc1 = 0;
  117. while ((loc1 < 0x2328)) {
  118. [-862954250] = ([-862954250] - 2);
  119. loc2 = (loc2 - [-862954250]);
  120. loc1 = (loc1 + 1);
  121. }
  122. }
  123. return (loc2);
  124. }
  125. void proc_8 (int arg0)
  126. /* Takes 8 bytes of parameters.
  127. * High-level language prologue code.
  128. * Untranslatable routine. Assembler provided.
  129. * C calling convention.
  130. * Contains instructions not normally used by compilers.
  131. * Contains coprocessor instructions.
  132. */
  133. {
  134. PUSH bp
  135. MOV bp, sp
  136. ESC qword ptr [126h]
  137. ESC qword ptr [bp+6]
  138. ESC FCOMPP
  139. ESC qword ptr [62Ch]
  140. INT 3Dh
  141. MOV ah, [62Dh]
  142. SAHF
  143. JAE L1
  144. ESC qword ptr [bp+6]
  145. ESC FCHS
  146. L2: POP bp
  147. RETF
  148. L1: ESC qword ptr [bp+6]
  149. JMP L2 ;Synthetic inst
  150. }
  151. proc_7 (int arg0, int arg1, int arg2, int arg3)
  152. /* Takes 8 bytes of parameters.
  153. * High-level language prologue code.
  154. * Untranslatable routine. Assembler provided.
  155. * C calling convention.
  156. * Contains instructions not normally used by compilers.
  157. * Contains coprocessor instructions.
  158. */
  159. {
  160. PUSH bp
  161. MOV bp, sp
  162. SUB sp, 10h
  163. ESC qword ptr [bp+6]
  164. ESC qword ptr [127h]
  165. ESC qword ptr [bp-8]
  166. INT 3Dh
  167. MOV ax, [bp+0Ch]
  168. MOV [bp-0Ah], ax
  169. MOV ax, [bp+0Ah]
  170. MOV [bp-0Ch], ax
  171. MOV ax, [bp+8]
  172. MOV [bp-0Eh], ax
  173. MOV ax, [bp+6]
  174. MOV [bp-10h], ax
  175. L3: ESC qword ptr [12Fh]
  176. ESC qword ptr [bp-8]
  177. ESC qword ptr [bp-10h]
  178. ESC qword ptr [62Ch]
  179. INT 3Dh
  180. MOV ah, [62Dh]
  181. SAHF
  182. JB L4
  183. ESC qword ptr [bp-8]
  184. MOV sp, bp
  185. POP bp
  186. RETF
  187. L4: ESC qword ptr [bp+6]
  188. ESC qword ptr [bp-8]
  189. ESC qword ptr [bp-8]
  190. ESC qword ptr [bp-10h]
  191. INT 3Dh
  192. PUSH word ptr [bp-0Ah]
  193. PUSH word ptr [bp-0Ch]
  194. PUSH word ptr [bp-0Eh]
  195. PUSH word ptr [bp-10h]
  196. CALL far ptr proc_8
  197. ADD sp, 8
  198. ESC qword ptr [bp-10h]
  199. INT 3Dh
  200. ESC qword ptr [bp+6]
  201. ESC qword ptr [bp-8]
  202. ESC qword ptr [bp-8]
  203. ESC qword ptr [127h]
  204. ESC qword ptr [bp-8]
  205. INT 3Dh
  206. JMP L3 ;Synthetic inst
  207. }
  208. proc_9 (int arg0)
  209. /* Takes 8 bytes of parameters.
  210. * High-level language prologue code.
  211. * C calling convention.
  212. * Contains instructions not normally used by compilers.
  213. * Contains coprocessor instructions.
  214. */
  215. {
  216. int loc1;
  217. int loc2;
  218. int loc3; /* ax */
  219. loc2 = 100;
  220. loc3 = loc2;
  221. loc2 = (loc2 - 1);
  222. while (((loc3 | loc3) != 0)) {
  223. loc3 = loc2;
  224. loc2 = (loc2 - 1);
  225. }
  226. return (var06278);
  227. }
  228. int proc_10 ()
  229. /* Takes no parameters.
  230. * High-level language prologue code.
  231. * Untranslatable routine. Assembler provided.
  232. * Return value in register ax.
  233. * Contains instructions not normally used by compilers.
  234. */
  235. {
  236. PUSH bp
  237. MOV bp, sp
  238. SUB sp, 68h
  239. PUSH si
  240. PUSH di
  241. PUSH ds
  242. MOV ax, 159h
  243. PUSH ax
  244. PUSH ss
  245. LEA ax, [bp-64h]
  246. PUSH ax
  247. PUSH cs
  248. CALL near ptr proc_2
  249. ADD sp, 8
  250. PUSH ds
  251. MOV ax, 170h
  252. PUSH ax
  253. PUSH ds
  254. MOV ax, 167h
  255. PUSH ax
  256. CALL far ptr fopen
  257. ADD sp, 8
  258. MOV [bp-66h], dx
  259. MOV [bp-68h], ax
  260. OR dx, ax
  261. JNE L5
  262. PUSH ds
  263. MOV ax, 172h
  264. PUSH ax
  265. CALL far ptr printf
  266. POP cx
  267. POP cx
  268. MOV ax, 0FFFFh
  269. PUSH ax
  270. CALL far ptr exit
  271. POP cx
  272. L5: XOR di, 0
  273. L6: INC di
  274. MOV ax, di
  275. CMP ax, 3E8h
  276. JL L7
  277. PUSH word ptr [bp-66h]
  278. PUSH word ptr [bp-68h]
  279. CALL far ptr fclose
  280. POP cx
  281. POP cx
  282. MOV ax, di
  283. POP di
  284. POP si
  285. MOV sp, bp
  286. POP bp
  287. RETF
  288. L7: XOR si, 0
  289. L8: CMP byte ptr ss:[bp+si-64h], 0
  290. JNE L9
  291. L9: LES bx, dword ptr [bp-68h]
  292. INC word ptr es:[bx]
  293. JGE L10
  294. MOV al, ss:[bp+si-64h]
  295. LES bx, dword ptr [bp-68h]
  296. INC word ptr es:[bx+0Ch]
  297. LES bx, dword ptr es:[bx+0Ch]
  298. DEC bx
  299. MOV es:[bx], al
  300. MOV ah, 0
  301. L11: INC si
  302. JMP L8 ;Synthetic inst
  303. L10: PUSH word ptr [bp-66h]
  304. PUSH word ptr [bp-68h]
  305. PUSH word ptr ss:[bp+si-64h]
  306. CALL far ptr _fputc
  307. ADD sp, 6
  308. JMP L11 ;Synthetic inst
  309. }
  310. void main ()
  311. /* Takes no parameters.
  312. * High-level language prologue code.
  313. * Contains instructions not normally used by compilers.
  314. * Contains coprocessor instructions.
  315. */
  316. {
  317. int loc1;
  318. int loc2;
  319. int loc3;
  320. int loc4;
  321. int loc5;
  322. int loc6;
  323. int loc7;
  324. int loc8;
  325. int loc9;
  326. int loc10;
  327. int loc11;
  328. int loc12; /* ax */
  329. int loc13; /* bx */
  330. loc11 = 0;
  331. printf ("Start...%c\n\n", 7);
  332. while ((loc11 < 6)) {
  333. loc12 = loc11;
  334. if (loc12 <= 5) {
  335. loc13 = (loc12 << 1);
  336. var06278 = proc_1 (&loc2, &loc1, , );
  337. printf ("\ncresult = %d\n", var06278);
  338. }
  339. loc11 = (loc11 + 1);
  340. }
  341. printf ("\n\n...End%c", 7);
  342. }