Guest User

Untitled

a guest
Jul 31st, 2021
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int __cdecl sub_76D4F0(int a1)
  2. {
  3. int result; // eax
  4. float v2; // eax
  5. double v3; // st7
  6. int v4; // esi
  7. int v5; // esi
  8. unsigned int v6; // eax
  9. int i; // esi
  10. unsigned __int64 v8; // rax
  11. float v9; // [esp+20h] [ebp-B58h]
  12. float v10; // [esp+24h] [ebp-B54h]
  13. double v11; // [esp+28h] [ebp-B50h]
  14. double v12; // [esp+30h] [ebp-B48h]
  15. double Y[129]; // [esp+38h] [ebp-B40h]
  16. char v14[12]; // [esp+440h] [ebp-738h] BYREF
  17. int v15; // [esp+44Ch] [ebp-72Ch]
  18. __int16 v16[770]; // [esp+570h] [ebp-608h] BYREF
  19. int v17; // [esp+B74h] [ebp-4h]
  20.  
  21. v17 = dword_857A00;
  22. result = (*(int (__stdcall **)(int, char *))(*(_DWORD *)a1 + 28))(a1, v14);
  23. if ( (v15 & 0x20000) != 0 )
  24. {
  25. *(float *)&v11 = *(float *)(dword_19BA9E8 + 40) + 1.0;
  26. *(float *)&v12 = *(float *)(dword_19BA9E8 + 44) + 1.0;
  27. *((float *)&v11 + 1) = *(float *)(dword_19BA9E8 + 48) + 1.0;
  28. *(float *)&v11 = *(float *)&v11 * 100.0 * ((2.4000001 - 0.0) / 200.0) + 0.0;
  29. *(float *)&v12 = *(float *)&v12 * 100.0 * 0.0049999999 + 0.5;
  30. *((float *)&v11 + 1) = *((float *)&v11 + 1) * 100.0 * 0.0049999999 + 0.5;
  31. if ( HIDWORD(v11) == 1065353216 )
  32. HIDWORD(v11) = 1065437102;
  33. v2 = 0.0;
  34. v10 = 0.0;
  35. do
  36. {
  37. v3 = (double)SLODWORD(v10);
  38. ++LODWORD(v2);
  39. v10 = v2;
  40. *((float *)Y + LODWORD(v2) + 1) = v3;
  41. }
  42. while ( SLODWORD(v2) < 256 );
  43. v4 = 0;
  44. v10 = 1.0 / *(float *)&v11;
  45. Y[0] = v10;
  46. do
  47. {
  48. v10 = *((float *)&Y[1] + v4) * 0.00390625;
  49. *(float *)&v11 = pow(v10, Y[0]);
  50. if ( *(float *)&v11 >= 0.0 )
  51. {
  52. if ( *(float *)&v11 > 1.0 )
  53. LODWORD(v11) = 1065353216;
  54. }
  55. else
  56. {
  57. LODWORD(v11) = 0;
  58. }
  59. LODWORD(v10) = (unsigned __int16)(unsigned __int64)(*(float *)&v11 * 256.0);
  60. *((float *)Y + ++v4 + 1) = (float)SLODWORD(v10);
  61. }
  62. while ( v4 < 256 );
  63. v5 = 0;
  64. v10 = flt_84DFB0 * *(float *)&v12;
  65. v12 = v10;
  66. do
  67. {
  68. v10 = (float)(int)(unsigned __int64)((tan(v12) + 1.0) * 128.0);
  69. if ( *((float *)&Y[1] + v5) >= (double)v10
  70. || (v10 = (float)(int)(unsigned __int64)(128.0 - tan(v12) * 128.0), *((float *)&Y[1] + v5) <= (double)v10) )
  71. {
  72. v10 = (float)(int)(unsigned __int64)((tan(v12) + 1.0) * 128.0);
  73. if ( *((float *)&Y[1] + v5) < (double)v10 )
  74. *((_DWORD *)&Y[1] + v5) = 0;
  75. else
  76. *((_DWORD *)&Y[1] + v5) = 1132396544;
  77. }
  78. else
  79. {
  80. Y[0] = *((float *)&Y[1] + v5) - 128.0;
  81. *((float *)&Y[1] + v5) = Y[0] / tan(v12) + 128.0;
  82. }
  83. ++v5;
  84. }
  85. while ( v5 < 256 );
  86. v6 = 0;
  87. v10 = *((float *)&v11 + 1) - 1.0;
  88. *(float *)&v11 = v10 * 256.0;
  89. do
  90. {
  91. v6 += 8;
  92. *(&v9 + v6) = *(float *)&v11 + *(&v9 + v6);
  93. *(&v10 + v6) = *(float *)&v11 + *(&v10 + v6);
  94. *((float *)&v11 + v6) = *(float *)&v11 + *((float *)&v11 + v6);
  95. *((float *)&v11 + v6 + 1) = *(float *)&v11 + *((float *)&v11 + v6 + 1);
  96. *((float *)&v12 + v6) = *(float *)&v11 + *((float *)&v12 + v6);
  97. *((float *)&v12 + v6 + 1) = *(float *)&v11 + *((float *)&v12 + v6 + 1);
  98. *(float *)&Y[v6 / 2] = *(float *)&v11 + *(float *)&Y[v6 / 2];
  99. *((float *)&Y[v6 / 2] + 1) = *(float *)&v11 + *((float *)&Y[v6 / 2] + 1);
  100. }
  101. while ( (int)v6 < 256 );
  102. for ( i = 0; i < 256; ++i )
  103. {
  104. v8 = (unsigned __int64)(*((float *)&Y[1] + i) * 256.0);
  105. if ( (int)v8 > 0 )
  106. {
  107. if ( (int)v8 > 0xFFFF )
  108. LOWORD(v8) = -1;
  109. }
  110. else
  111. {
  112. LOWORD(v8) = 1;
  113. }
  114. v16[i + 512] = v8;
  115. v16[i + 256] = v8;
  116. v16[i] = v8;
  117. }
  118. result = (*(int (__stdcall **)(int, _DWORD, _DWORD, __int16 *))(*(_DWORD *)a1 + 84))(a1, 0, 0, v16);
  119. }
  120. return result;
  121. }
RAW Paste Data