Guest User

Untitled

a guest
Jul 20th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.49 KB | None | 0 0
  1. int __stdcall sub_49D8E0(int a1)
  2. {
  3. int result; // eax@1
  4. int v2; // edi@1
  5. int v3; // edx@3
  6. int v4; // ebx@3
  7. int v5; // eax@6
  8. int v6; // ebx@10
  9. signed int v8; // esi@12
  10. int v9; // eax@14
  11. unsigned int v10; // ebx@17
  12. int v11; // ebx@46
  13. int v12; // eax@1
  14. int v13; // edx@1
  15. int v14; // esi@3
  16. int v15; // eax@10
  17. int v17; // eax@48
  18. int v18; // eax@49
  19. int v19; // eax@54
  20. int v21; // eax@55
  21. int v27; // et0@64
  22. char v28; // zf@64
  23. char v30; // [sp+108h] [bp-14h]@10
  24. int v32; // [sp+114h] [bp-8h]@11
  25. char Str2; // [sp+4h] [bp-118h]@16
  26.  
  27. v12 = ClntObjMgrGetActivePlayer();
  28. result = GetObjectByGuid(v12, v13, 16);
  29. v2 = result;
  30. if ( result )
  31. {
  32. if ( *(_BYTE *)(result + 6232) & 1
  33. && ((v14 = (*(int (__thiscall **)(int))(*(_DWORD *)result + 60))(result), v4 = v3, sub_49D1D0() != v14) || v3 != v4)
  34. || !(unsigned __int8)sub_66AE00() )
  35. {
  36. v5 = sub_6712B0();
  37. if ( *(_DWORD *)(*(_DWORD *)(a1 + 208) + 68) > 0 && v5 && (unsigned __int8)sub_6BCC20(a1) )
  38. return CGCursor_C__SetCursor(4);
  39. return sub_5ACBC0();
  40. }
  41. v6 = a1;
  42. v15 = (*(int (__thiscall **)(int, char *))(*(_DWORD *)a1 + 40))(a1, &v30);
  43. sub_49C170(v15);
  44. __asm { fstp [ebp+var_4] }
  45. if ( (unsigned __int8)sub_6BC7D0(v6) )
  46. {
  47. v32 = v6 + 208;
  48. _EAX = *(_DWORD *)(v6 + 208);
  49. if ( *(_DWORD *)(_EAX + 304) )
  50. {
  51. __asm
  52. {
  53. fld dword ptr [eax+0ECh]
  54. fadd ds:flt_9CCA70
  55. fmul st, st
  56. fcomp [ebp+var_4]
  57. fnstsw ax
  58. jp short loc_49D9E8
  59. }
  60. v8 = 1;
  61. v9 = sub_6A93B0(v8);
  62. if ( v9 )
  63. {
  64. if ( v9 == 53 )
  65. {
  66. sub_6A9430(v8, &Str2, 260);
  67. result = sub_5ACAD0(&Str2);
  68. }
  69. else
  70. {
  71. LABEL_61:
  72. result = CGCursor_C__SetCursor(v9);
  73. }
  74. return result;
  75. }
  76. v10 = *(_DWORD *)(*(_DWORD *)v32 + 304);
  77. if ( (v10 >> 12) & 1 )
  78. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 18);
  79. if ( (v10 >> 16) & 1 )
  80. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 22);
  81. if ( (v10 >> 13) & 1 )
  82. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 9);
  83. if ( (v10 >> 4) & 1 )
  84. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 10);
  85. if ( !((v10 >> 14) & 1) && !((v10 >> 15) & 1) )
  86. {
  87. if ( (v10 >> 17) & 1 || (v10 >> 23) & 1 )
  88. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 3);
  89. if ( (v10 >> 18) & 1 || (v10 >> 19) & 1 || (unsigned __int8)sub_49BD20() || (v10 >> 20) & 1 )
  90. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 6);
  91. if ( (v10 >> 21) & 1 )
  92. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 3);
  93. if ( !((v10 >> 22) & 1) )
  94. {
  95. if ( (v10 >> 7) & 1 )
  96. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 8);
  97. if ( !(v10 & 1) )
  98. {
  99. if ( (v10 >> 24) & 1 )
  100. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 5);
  101. if ( (unsigned __int8)sub_6B6640(v2) )
  102. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 26);
  103. return sub_5ACBC0();
  104. }
  105. }
  106. }
  107. return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 6);
  108. }
  109. }
  110. if ( !sub_6AAF70(dword_CF6B04) )
  111. {
  112. if ( !((*(_DWORD *)(*(_DWORD *)(v6 + 208) + 208) >> 26) & 1)
  113. || !sub_4D4C50(v6)
  114. || (*(_DWORD *)(*(_DWORD *)(v6 + 8) + 8) >> 4) & 1 && (unsigned __int8)sub_6BC580(v6, 0) )
  115. {
  116. if ( (unsigned __int8)sub_6BCC20(v6) )
  117. {
  118. v27 = *(_DWORD *)(*(_DWORD *)(v2 + 208) + 208);
  119. v27 &= 0x20000u;
  120. v28 = v27 == 0;
  121. if ( v28 )
  122. {
  123. if ( dword_B6795C )
  124. {
  125. sub_49BCE0(v6 + 208);
  126. __asm
  127. {
  128. fmul st, st
  129. fcomp [ebp+var_4]
  130. fnstsw ax
  131. jp loc_49D973
  132. }
  133. return CGCursor_C__SetCursor(30);
  134. }
  135. }
  136. }
  137. }
  138. else
  139. {
  140. v19 = sub_4D4C50(v6);
  141. Spell_C__GetSpellRange(v2, v19, &v32, &a1, v6);
  142. if ( (*(_DWORD *)(*(_DWORD *)(v6 + 8) + 8) >> 4) & 1 )
  143. {
  144. __asm
  145. {
  146. fld [ebp+arg_0]
  147. fmul st, st
  148. fcomp [ebp+var_4]
  149. fnstsw ax
  150. jp short loc_49DD30
  151. }
  152. v21 = sub_66A220();
  153. return CGCursor_C__SetCursor(dword_9DA36C[v21]);
  154. }
  155. switch ( sub_6A9360() )
  156. {
  157. case 0:
  158. __asm
  159. {
  160. fld [ebp+arg_0] ; jumptable 0049DD5E case 0
  161. fmul st, st
  162. fcomp [ebp+var_4]
  163. fnstsw ax
  164. jnp short loc_49DD7E
  165. }
  166. return CGCursor_C__SetCursor(12);
  167. case 1:
  168. __asm
  169. {
  170. fld [ebp+arg_0] ; jumptable 0049DD5E case 1
  171. fmul st, st
  172. fcomp [ebp+var_4]
  173. fnstsw ax
  174. jnp short loc_49DDA9
  175. }
  176. return CGCursor_C__SetCursor(13);
  177. case 2:
  178. __asm
  179. {
  180. fld [ebp+arg_0] ; jumptable 0049DD5E case 2
  181. fmul st, st
  182. fcomp [ebp+var_4]
  183. fnstsw ax
  184. jnp short loc_49DDD4
  185. }
  186. v9 = 11;
  187. goto LABEL_61;
  188. case 3:
  189. __asm
  190. {
  191. fld [ebp+arg_0] ; jumptable 0049DD5E case 3
  192. fmul st, st
  193. fcomp [ebp+var_4]
  194. fnstsw ax
  195. jnp short loc_49DDFF
  196. }
  197. return CGCursor_C__SetCursor(11);
  198. default:
  199. return sub_5ACBC0();
  200. }
  201. }
  202. return sub_5ACBC0();
  203. }
  204. if ( sub_668EC0(v6)
  205. || (v11 = *(_DWORD *)(v6 + 8), *(_DWORD *)(v2 + 6352) == *(_DWORD *)v11)
  206. && *(_DWORD *)(v2 + 6356) == *(_DWORD *)(v11 + 4) )
  207. {
  208. v17 = sub_4B8F10();
  209. result = CGCursor_C__SetCursor((-(v17 != 0) & 8) + 8);
  210. }
  211. else
  212. {
  213. v18 = sub_4B8F10();
  214. result = CGCursor_C__SetCursor((-(v18 != 0) & 8) + 34);
  215. }
  216. }
  217. return result;
  218. }
Add Comment
Please, Sign In to add comment