Code:
char __cdecl GetGuidByKeyword(int a1, int a2, char a3, int a4)
{
int v4; // eax@1
int v5; // edi@6
int v6; // eax@6
int v7; // ecx@9
int v8; // esi@11
int v9; // esi@12
int *v10; // esi@12
int v11; // eax@20
int v12; // eax@38
int v13; // ST1C_4@38
int v14; // eax@41
int v15; // eax@52
int v16; // ST1C_4@52
int v17; // eax@55
int v18; // eax@64
int v19; // ST1C_4@64
int v20; // eax@68
int v21; // eax@76
int v22; // ST1C_4@76
int v23; // eax@88
int v24; // eax@94
int v25; // eax@99
int v26; // eax@105
int v27; // ebx@132
int v28; // edi@132
int v29; // edi@135
int v30; // eax@144
int v31; // ST1C_4@144
int v32; // eax@154
int v33; // ST1C_4@154
int v34; // edi@157
int v35; // esi@157
int v36; // edi@158
int v37; // ecx@158
_UNKNOWN *v38; // esi@165
int v39; // edi@168
int v40; // esi@168
signed int v42; // [sp-1Ch] [bp-48h]@44
int v43; // [sp-18h] [bp-44h]@44
int v44; // [sp-14h] [bp-40h]@44
signed int v45; // [sp-10h] [bp-3Ch]@44
int v46; // [sp-Ch] [bp-38h]@44
signed int v47; // [sp-Ch] [bp-38h]@110
signed int v48; // [sp-Ch] [bp-38h]@121
signed int v49; // [sp-8h] [bp-34h]@44
int v50; // [sp-8h] [bp-34h]@110
int v51; // [sp-8h] [bp-34h]@121
int v52; // [sp+8h] [bp-24h]@12
int v53; // [sp+Ch] [bp-20h]@12
int v54; // [sp+10h] [bp-1Ch]@12
int v55; // [sp+14h] [bp-18h]@12
int v56; // [sp+18h] [bp-14h]@6
int v57; // [sp+1Ch] [bp-10h]@6
int v58; // [sp+20h] [bp-Ch]@1
int v59; // [sp+24h] [bp-8h]@6
char v60; // [sp+2Bh] [bp-1h]@4
v4 = ClntObjMgrGetActivePlayerObj();
v58 = v4;
if ( a1 && *(_BYTE *)a1 )
{
if ( !v4 || (v60 = 1, !(unsigned __int8)sub_6BA9FA(v4 + 6088)) )
v60 = 0;
v5 = a2;
v6 = a1;
*(_DWORD *)a2 = unk_1342BF0;
v5 += 4;
*(_DWORD *)v5 = *((_DWORD *)&unk_1342BF0 + 1);
v5 += 4;
*(_DWORD *)v5 = *((_DWORD *)&unk_1342BF0 + 2);
v57 = v6;
*(_DWORD *)(v5 + 4) = *((_DWORD *)&unk_1342BF0 + 3);
v59 = sub_850A1E();
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "player", 6) )
{
a1 += 6;
if ( !v58 )
{
v10 = (int *)&unk_1342BF0;
goto LABEL_156;
}
v8 = *(_DWORD *)(v58 + 4);
LABEL_12:
v52 = *(_DWORD *)v8;
v9 = v8 + 4;
v53 = *(_DWORD *)v9;
v9 += 4;
v54 = *(_DWORD *)v9;
v55 = *(_DWORD *)(v9 + 4);
v10 = &v52;
LABEL_156:
v29 = a2;
goto LABEL_157;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "vehicle", 7) )
{
a1 += 7;
if ( v58 && sub_76E267(v58) )
{
v11 = (*(int (__thiscall **)(int, int *))(*(_DWORD *)v58 + 208))(v58, &v52);
LABEL_22:
v10 = (int *)v11;
goto LABEL_156;
}
LABEL_21:
v11 = (int)&unk_1342BF0;
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "pet", 3) )
{
a1 += 3;
if ( v58 )
{
v11 = sub_673547(v58 + 284);
goto LABEL_22;
}
goto LABEL_21;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "target", 6) )
{
a1 += 6;
v10 = (int *)&unk_1250760;
goto LABEL_156;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "partypet", 8) )
{
a1 += 8;
v12 = sub_56CF87(&a1) - 1;
v7 = v13;
if ( !v59 || (v7 = v59, (unsigned int)v12 >= *(_DWORD *)(v59 + 208)) )
goto LABEL_158;
if ( (unsigned int)v12 >= 4 )
v14 = 0;
else
v14 = *(_DWORD *)(v59 + 4 * v12 + 160);
if ( !v14 )
{
v49 = 286331153;
v46 = 0;
v45 = 1;
v44 = 0;
v43 = (int)"member";
v42 = 293;
goto LABEL_45;
}
LABEL_47:
v11 = sub_8535D3(&v52);
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "party", 5) )
{
a1 += 5;
v15 = sub_56CF87(&a1) - 1;
v7 = v16;
if ( !v59 || (v7 = v59, (unsigned int)v15 >= *(_DWORD *)(v59 + 208)) )
goto LABEL_158;
if ( (unsigned int)v15 >= 4 )
v17 = 0;
else
v17 = *(_DWORD *)(v59 + 4 * v15 + 160);
if ( !v17 )
{
v49 = 286331153;
v46 = 0;
v45 = 1;
v44 = 0;
v43 = (int)"member";
v42 = 303;
goto LABEL_45;
}
LABEL_59:
v8 = v17 + 16;
goto LABEL_12;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "raidpet", 7) )
{
a1 += 7;
v18 = sub_56CF87(&a1) - 1;
v7 = v19;
if ( !v59
|| (v7 = *(_DWORD *)(v59 + 232) >> 1, !(v7 & 1))
|| (v7 = v59, (unsigned int)v18 >= *(_DWORD *)(v59 + 204)) )
goto LABEL_158;
if ( (unsigned int)v18 >= 0x28 )
v20 = 0;
else
v20 = *(_DWORD *)(v59 + 4 * v18);
if ( v20 )
goto LABEL_47;
v49 = 286331153;
v46 = 0;
v45 = 1;
v44 = 0;
v43 = (int)"member";
v42 = 314;
goto LABEL_45;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "raid", 4) )
{
a1 += 4;
v21 = sub_56CF87(&a1) - 1;
v7 = v22;
if ( !v59
|| (v7 = *(_DWORD *)(v59 + 232) >> 1, !(v7 & 1))
|| (v7 = v59, (unsigned int)v21 >= *(_DWORD *)(v59 + 204)) )
goto LABEL_158;
if ( (unsigned int)v21 >= 0x28 )
v17 = 0;
else
v17 = *(_DWORD *)(v59 + 4 * v21);
if ( v17 )
goto LABEL_59;
v49 = 286331153;
v46 = 0;
v45 = 1;
v44 = 0;
v43 = (int)"member";
v42 = 324;
LABEL_45:
if ( (unsigned __int8)sub_56B80D(-2062548992, "ScriptEvents.cpp", v42, v43, v44, v45, v46, v49) )
__debugbreak();
goto LABEL_158;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "boss", 4) )
{
a1 += 4;
v23 = sub_56CF87(&a1);
v11 = sub_8C8132(&v52, v23 - 1);
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "arenapet", 8) )
{
a1 += 8;
v24 = sub_56CF87(&a1);
v11 = sub_880B6F(&v52, v24 - 1);
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "arena", 5) )
{
a1 += 5;
v25 = sub_56CF87(&a1);
v11 = sub_6B6587(&v52, v25 - 1);
goto LABEL_22;
}
if ( v60 )
{
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "commentator", 11) )
{
a1 += 11;
v26 = sub_56CF87(&a1);
v11 = sub_8D4357(&v52, v26 - 1);
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "spectatedpeta", 13) )
{
a1 += 13;
v50 = sub_56CF87(&a1) - 1;
v47 = 1;
LABEL_111:
v11 = sub_8D53BA(&v52, v47, v50);
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "spectatedpetb", 13) )
{
a1 += 13;
v50 = sub_56CF87(&a1) - 1;
v47 = 0;
goto LABEL_111;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "spectateda", 10) )
{
a1 += 10;
v51 = sub_56CF87(&a1) - 1;
v48 = 1;
LABEL_122:
v11 = sub_8D43CB(&v52, v48, v51);
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "spectatedb", 10) )
{
a1 += 10;
v51 = sub_56CF87(&a1) - 1;
v48 = 0;
goto LABEL_122;
}
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( sub_B11D36(v56, "mouseover", 9) )
{
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
85,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11D36(v56, "focus", 5) )
{
a1 += 5;
v10 = (int *)&unk_12507A0;
goto LABEL_156;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
66,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
v30 = sub_B11C0D(v56, "npc");
v7 = v31;
if ( !v30 )
{
a1 += 3;
v10 = (int *)&unk_1250740;
goto LABEL_156;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
66,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
if ( !sub_B11C0D(v56, "questnpc") )
{
a1 += 8;
v11 = sub_7CE6B4();
goto LABEL_22;
}
v56 = a1;
if ( !a1
&& (unsigned __int8)sub_56B80D(
-2062548992,
"d:\\buildserver\\wow\\3\\work\\wow-code\\branches\\wow-patch-6_0_1-branch-fastpatch-3\\storm\\h\\SStr.inl",
66,
"string1",
a1,
1,
a1,
286331153) )
__debugbreak();
v32 = sub_B11C0D(v56, "none");
v7 = v33;
if ( !v32 )
{
a1 += 4;
v10 = (int *)&unk_1342CA0;
goto LABEL_156;
}
}
else
{
v27 = a2;
a1 += 9;
v28 = a2;
*(_DWORD *)a2 = dword_1250730[0];
v28 += 4;
*(_DWORD *)v28 = dword_1250730[1];
v28 += 4;
*(_DWORD *)v28 = dword_1250730[2];
*(_DWORD *)(v28 + 4) = dword_1250730[3];
if ( !ClntObjMgrObjectPtr(v27, 8, (unsigned int)"ScriptEvents.cpp") )
{
v7 = v59;
if ( !v59 || !(unsigned __int8)sub_7266C4(v27) )
{
v10 = (int *)&unk_1342BF0;
v29 = v27;
LABEL_157:
*(_DWORD *)v29 = *v10;
v35 = (int)(v10 + 1);
v34 = v29 + 4;
*(_DWORD *)v34 = *(_DWORD *)v35;
v35 += 4;
v34 += 4;
*(_DWORD *)v34 = *(_DWORD *)v35;
*(_DWORD *)(v34 + 4) = *(_DWORD *)(v35 + 4);
goto LABEL_158;
}
}
}
LABEL_158:
v36 = a2;
LOBYTE(v7) = 58;
if ( (((sub_B12F20(v7, *(_DWORD *)(a2 + 12)) & 0x3F) != 0 ? a2 : 0) || !*(_BYTE *)a1)
&& (unsigned __int8)sub_7CECE6(a1, v36, v58)
|| (LOBYTE(v37) = 58, !((sub_B12F20(v37, *(_DWORD *)(v36 + 12)) & 0x3F) != 0 ? v36 : 0))
&& (unsigned __int8)sub_7CE6D5(&v57, v36, a4)
&& (unsigned __int8)sub_7CECE6(v57, v36, v58) )
{
LOBYTE(v37) = 58;
if ( (sub_B12F20(v37, *(_DWORD *)(v36 + 12)) & 0x3F) != 0 ? v36 : 0 )
return 1;
v38 = &unk_1342C90;
LABEL_168:
*(_DWORD *)v36 = *(_DWORD *)v38;
v40 = (int)((char *)v38 + 4);
v39 = v36 + 4;
*(_DWORD *)v39 = *(_DWORD *)v40;
v40 += 4;
v39 += 4;
*(_DWORD *)v39 = *(_DWORD *)v40;
*(_DWORD *)(v39 + 4) = *(_DWORD *)(v40 + 4);
return 1;
}
return 0;
}
if ( a3 )
{
v36 = a2;
v38 = &unk_1250760;
goto LABEL_168;
}
return 0;
}
there alot of debug breakpoints, but it should work