Advertisement
Guest User

Untitled

a guest
May 16th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1. bool __usercall year_count@<eax>(bool result@<eax>, int a2@<edx>, int a3@<ebx>, int a4@<ebp>)
  2. {
  3. int v4; // edx@1
  4. int v5; // eax@2
  5. int week_; // edx@5
  6. signed __int16 day__; // si@8
  7. int v8; // eax@29
  8. int v9; // eax@34
  9.  
  10. LOWORD(a3) = month;
  11. LOWORD(a2) = tick;
  12. LOWORD(result) = speed;
  13. v4 = result + a2;
  14. tick = v4;
  15. if ( (signed __int16)v4 >= 36 )
  16. {
  17. LOWORD(result) = second;
  18. v5 = result + 1;
  19. second = v5;
  20. tick = v4 - 36;
  21. if ( (signed __int16)v5 < 60 )
  22. return sub_783A0(v5);
  23. second = 0;
  24. if ( ++minute < 60 )
  25. {
  26. LABEL_35:
  27. v5 = sub_4AA7C(*(_DWORD *)&hour >> 16);
  28. return sub_783A0(v5);
  29. }
  30. minute = 0;
  31. if ( ++hour >= 24 )
  32. {
  33. LOWORD(v4) = week;
  34. BYTE1(v5) = alien_demen_flag;
  35. week_ = v4 + 1;
  36. if ( !alien_demen_flag )
  37. {
  38. week = week_;
  39. hour = 0;
  40. if ( (_WORD)week_ == 7 )
  41. week = 0;
  42. day__ = day + 1;
  43. if ( day == 28 )
  44. {
  45. if ( month != 1 )
  46. goto LABEL_25;
  47. v5 = (unsigned __int16)year / 4;
  48. week_ = (unsigned __int16)year % 4;
  49. if ( !week_ )
  50. goto LABEL_25;
  51. day__ = 1;
  52. }
  53. else
  54. {
  55. if ( day__ == 30 )
  56. {
  57. if ( month == 1 )
  58. {
  59. v5 = (year == 0) / 4;
  60. week_ = (year == 0) % 4;
  61. if ( week_ )
  62. {
  63. day__ = 1;
  64. a3 *= 2;
  65. }
  66. }
  67. goto LABEL_25;
  68. }
  69. if ( day__ == 31 )
  70. {
  71. if ( month == 3 || month == 5 || month == 8 || month == 10 )
  72. {
  73. day__ = 1;
  74. ++a3;
  75. }
  76. goto LABEL_25;
  77. }
  78. if ( day__ != 32 )
  79. {
  80. LABEL_25:
  81. if ( (_WORD)a3 == 12 )
  82. {
  83. a3 = 0;
  84. ++year;
  85. }
  86. month = a3;
  87. day = day__;
  88. if ( !week )
  89. {
  90. LOBYTE(week_) = alien_demen_flag;
  91. ++cur_income;
  92. if ( !alien_demen_flag )
  93. {
  94. v8 = sub_941DC(0);
  95. sub_6EDAC(v8);
  96. v5 = market();
  97. }
  98. }
  99. if ( !alien_demen_flag )
  100. {
  101. gen_teh_unit(v5, week_, a3);
  102. sub_6FD6C();
  103. sub_97B90();
  104. }
  105. goto LABEL_33;
  106. }
  107. day__ = 1;
  108. }
  109. ++a3;
  110. goto LABEL_25;
  111. }
  112. week = week_;
  113. minute = 0;
  114. second = 0;
  115. tick = 0;
  116. dword_E72D0 = 0;
  117. hour = 0;
  118. }
  119. LABEL_33:
  120. if ( !alien_demen_flag )
  121. {
  122. sub_6F3A8();
  123. sub_6F7D4();
  124. diplomatic_screen();
  125. Research();
  126. Manufacturing(a4);
  127. v9 = gen_org_veh();
  128. sub_6CA60(v9);
  129. sub_6FCC0();
  130. gen_police_veh();
  131. }
  132. goto LABEL_35;
  133. }
  134. return result;
  135. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement