Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

function public.getWeaponImage(slot#1, icon#0)
{
    lit#2 = "Bounty Box";
    fn_call#4 = lit.bountyActive();
    // RegionId(1)
    if (fn_call#4) 
    {
        lit#5 = "classiciphone_virtualkey_none_blue.png";
        return lit#5;
    }
    // RegionId(31)
    else
    {
        lit#8 = "Bow";
        // RegionId(31)
        // RegionId(32)
        if (!(client.selectedweapons[slot#1] == lit#8)) 
        {
            lit#9 = "CustomBow";
            // RegionId(33)
            if (!(phi<idx=0, regions=()> == lit#9)) 
            {
                lit#10 = "Bomb";
                // RegionId(33)
                // RegionId(34)
                if (!(phi<idx=0, regions=()> == lit#10)) 
                {
                    lit#11 = "CustomBomb";
                    // RegionId(35)
                    if (!(phi<idx=0, regions=()> == lit#11)) 
                    {
                        lit#12 = "Trophies";
                        // RegionId(36)
                        if (!(phi<idx=0, regions=()> == lit#12)) 
                        {
                            temp.iconimg = client.selectedweaponsicons[slot#1];
                            builtin_fn_call#16 = temp.iconimg.length();
                            lit#17 = 1;
                            // RegionId(15)
                            if (builtin_fn_call#16 > lit#17) 
                            {
                                // RegionId(15)
                                // RegionId(16)
                                if (icon#0) 
                                {
                                }
                                // RegionId(17)
                                else
                                {
                                    lit#18 = "classiciphone_virtualkey_none_blue.png";
                                }
                                return phi<idx=0, regions=()>;
                            }
                            // RegionId(19)
                            else
                            {
                                // RegionId(20)
                                if (icon#0) 
                                {
                                    lit#19 = "";
                                    return lit#19;
                                }
                                // RegionId(21)
                                else
                                {
                                    fn_call#22 = findweapon#21(client.selectedweapons[slot#1]);
                                    temp.weapon = fn_call#22;
                                    lit#24 = "getDisplayImage";
                                    fn_call#26 = temp.weapon.hasFunction(lit#24);
                                    // RegionId(21)
                                    // RegionId(22)
                                    if (fn_call#26) 
                                    {
                                        fn_call#28 = temp.weapon.getDisplayImage();
                                    }
                                    // RegionId(23)
                                    else
                                    {
                                    }
                                    phi<idx=1, regions=()> = phi<idx=0, regions=()>;
                                    lit#30 = ".png";
                                    builtin_fn_call#31 = temp.img.ends(lit#30);
                                    // RegionId(24)
                                    // RegionId(25)
                                    if (builtin_fn_call#31) 
                                    {
                                        lit#32 = ".gif";
                                        builtin_fn_call#33 = temp.img.ends(lit#32);
                                    }
                                    // RegionId(27)
                                    if (phi<idx=0, regions=()>) 
                                    {
                                        return temp.img;
                                    }
                                    // RegionId(28)
                                    else
                                    {
                                        builtin_fn_call#34 = temp.img.length();
                                        lit#35 = 1;
                                        // RegionId(29)
                                        if (builtin_fn_call#34 > lit#35) 
                                        {
                                            lit#36 = "_blue.png";
                                            return temp.img @ lit#36;
                                        }
                                        // RegionId(30)
                                        else
                                        {
                                            lit#37 = "";
                                            return lit#37;
                                        }
                                    }
                                }
                            }
                        }
                        // RegionId(10)
                        else
                        {
                            // RegionId(10)
                            // RegionId(11)
                            if (icon#0) 
                            {
                                lit#38 = "";
                            }
                            // RegionId(12)
                            else
                            {
                                lit#39 = "classiciphone_virtualkey_trophy_blue.png";
                            }
                            return phi<idx=0, regions=()>;
                        }
                    }
                }
                // RegionId(6)
                // RegionId(7)
                if (icon#0) 
                {
                    lit#40 = "";
                }
                // RegionId(8)
                else
                {
                    lit#41 = "classiciphone_virtualkey_bomb_blue.png";
                }
                return phi<idx=0, regions=()>;
            }
        }
        // RegionId(2)
        // RegionId(3)
        if (icon#0) 
        {
            lit#42 = "";
        }
        // RegionId(4)
        else
        {
            lit#43 = "classiciphone_virtualkey_bow_blue.png";
        }
        return phi<idx=0, regions=()>;
    }
}