Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int __stdcall sub_49D8E0(int a1)
- {
- int result; // eax@1
- int v2; // edi@1
- int v3; // edx@3
- int v4; // ebx@3
- int v5; // eax@6
- int v6; // ebx@10
- signed int v8; // esi@12
- int v9; // eax@14
- unsigned int v10; // ebx@17
- int v11; // ebx@46
- int v12; // eax@1
- int v13; // edx@1
- int v14; // esi@3
- int v15; // eax@10
- int v17; // eax@48
- int v18; // eax@49
- int v19; // eax@54
- int v21; // eax@55
- int v27; // et0@64
- char v28; // zf@64
- char v30; // [sp+108h] [bp-14h]@10
- int v32; // [sp+114h] [bp-8h]@11
- char Str2; // [sp+4h] [bp-118h]@16
- v12 = ClntObjMgrGetActivePlayer();
- result = GetObjectByGuid(v12, v13, 16);
- v2 = result;
- if ( result )
- {
- if ( *(_BYTE *)(result + 6232) & 1
- && ((v14 = (*(int (__thiscall **)(int))(*(_DWORD *)result + 60))(result), v4 = v3, sub_49D1D0() != v14) || v3 != v4)
- || !(unsigned __int8)sub_66AE00() )
- {
- v5 = sub_6712B0();
- if ( *(_DWORD *)(*(_DWORD *)(a1 + 208) + 68) > 0 && v5 && (unsigned __int8)sub_6BCC20(a1) )
- return CGCursor_C__SetCursor(4);
- return sub_5ACBC0();
- }
- v6 = a1;
- v15 = (*(int (__thiscall **)(int, char *))(*(_DWORD *)a1 + 40))(a1, &v30);
- sub_49C170(v15);
- __asm { fstp [ebp+var_4] }
- if ( (unsigned __int8)sub_6BC7D0(v6) )
- {
- v32 = v6 + 208;
- _EAX = *(_DWORD *)(v6 + 208);
- if ( *(_DWORD *)(_EAX + 304) )
- {
- __asm
- {
- fld dword ptr [eax+0ECh]
- fadd ds:flt_9CCA70
- fmul st, st
- fcomp [ebp+var_4]
- fnstsw ax
- jp short loc_49D9E8
- }
- v8 = 1;
- v9 = sub_6A93B0(v8);
- if ( v9 )
- {
- if ( v9 == 53 )
- {
- sub_6A9430(v8, &Str2, 260);
- result = sub_5ACAD0(&Str2);
- }
- else
- {
- LABEL_61:
- result = CGCursor_C__SetCursor(v9);
- }
- return result;
- }
- v10 = *(_DWORD *)(*(_DWORD *)v32 + 304);
- if ( (v10 >> 12) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 18);
- if ( (v10 >> 16) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 22);
- if ( (v10 >> 13) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 9);
- if ( (v10 >> 4) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 10);
- if ( !((v10 >> 14) & 1) && !((v10 >> 15) & 1) )
- {
- if ( (v10 >> 17) & 1 || (v10 >> 23) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 3);
- if ( (v10 >> 18) & 1 || (v10 >> 19) & 1 || (unsigned __int8)sub_49BD20() || (v10 >> 20) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 6);
- if ( (v10 >> 21) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 3);
- if ( !((v10 >> 22) & 1) )
- {
- if ( (v10 >> 7) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 8);
- if ( !(v10 & 1) )
- {
- if ( (v10 >> 24) & 1 )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 5);
- if ( (unsigned __int8)sub_6B6640(v2) )
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 26);
- return sub_5ACBC0();
- }
- }
- }
- return CGCursor_C__SetCursor((-(v8 != 0) & 0x1A) + 6);
- }
- }
- if ( !sub_6AAF70(dword_CF6B04) )
- {
- if ( !((*(_DWORD *)(*(_DWORD *)(v6 + 208) + 208) >> 26) & 1)
- || !sub_4D4C50(v6)
- || (*(_DWORD *)(*(_DWORD *)(v6 + 8) + 8) >> 4) & 1 && (unsigned __int8)sub_6BC580(v6, 0) )
- {
- if ( (unsigned __int8)sub_6BCC20(v6) )
- {
- v27 = *(_DWORD *)(*(_DWORD *)(v2 + 208) + 208);
- v27 &= 0x20000u;
- v28 = v27 == 0;
- if ( v28 )
- {
- if ( dword_B6795C )
- {
- sub_49BCE0(v6 + 208);
- __asm
- {
- fmul st, st
- fcomp [ebp+var_4]
- fnstsw ax
- jp loc_49D973
- }
- return CGCursor_C__SetCursor(30);
- }
- }
- }
- }
- else
- {
- v19 = sub_4D4C50(v6);
- Spell_C__GetSpellRange(v2, v19, &v32, &a1, v6);
- if ( (*(_DWORD *)(*(_DWORD *)(v6 + 8) + 8) >> 4) & 1 )
- {
- __asm
- {
- fld [ebp+arg_0]
- fmul st, st
- fcomp [ebp+var_4]
- fnstsw ax
- jp short loc_49DD30
- }
- v21 = sub_66A220();
- return CGCursor_C__SetCursor(dword_9DA36C[v21]);
- }
- switch ( sub_6A9360() )
- {
- case 0:
- __asm
- {
- fld [ebp+arg_0] ; jumptable 0049DD5E case 0
- fmul st, st
- fcomp [ebp+var_4]
- fnstsw ax
- jnp short loc_49DD7E
- }
- return CGCursor_C__SetCursor(12);
- case 1:
- __asm
- {
- fld [ebp+arg_0] ; jumptable 0049DD5E case 1
- fmul st, st
- fcomp [ebp+var_4]
- fnstsw ax
- jnp short loc_49DDA9
- }
- return CGCursor_C__SetCursor(13);
- case 2:
- __asm
- {
- fld [ebp+arg_0] ; jumptable 0049DD5E case 2
- fmul st, st
- fcomp [ebp+var_4]
- fnstsw ax
- jnp short loc_49DDD4
- }
- v9 = 11;
- goto LABEL_61;
- case 3:
- __asm
- {
- fld [ebp+arg_0] ; jumptable 0049DD5E case 3
- fmul st, st
- fcomp [ebp+var_4]
- fnstsw ax
- jnp short loc_49DDFF
- }
- return CGCursor_C__SetCursor(11);
- default:
- return sub_5ACBC0();
- }
- }
- return sub_5ACBC0();
- }
- if ( sub_668EC0(v6)
- || (v11 = *(_DWORD *)(v6 + 8), *(_DWORD *)(v2 + 6352) == *(_DWORD *)v11)
- && *(_DWORD *)(v2 + 6356) == *(_DWORD *)(v11 + 4) )
- {
- v17 = sub_4B8F10();
- result = CGCursor_C__SetCursor((-(v17 != 0) & 8) + 8);
- }
- else
- {
- v18 = sub_4B8F10();
- result = CGCursor_C__SetCursor((-(v18 != 0) & 8) + 34);
- }
- }
- return result;
- }
Add Comment
Please, Sign In to add comment