// Decompiled by DJ v3.12.12.96 Copyright 2011 Atanas Neshkov  Date: 12.08.2011 2:53:57
// Home Page: http://members.fortunecity.com/neshkov/dj.html  http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3) 

import agent.JAgent;
import javax.microedition.midlet.MIDlet;

public final class h
{

    public h()
    {
        b_byte_array1d_fld = new byte[44];
        for(int i = 0; i < 44; i++)
            b_byte_array1d_fld[i] = 0;

        p.a(b_byte_array1d_fld, 0, 0xdeadbeef);
        p.a(b_byte_array1d_fld, 4, 0x1000b);
        p.a(b_byte_array1d_fld, 20, a_int_static_fld);
        p.a(b_byte_array1d_fld, 24, b_int_static_fld);
        a_byte_array1d_fld = new byte[0];
    }

    public h(int i)
    {
        this();
        b(i);
    }

    private void b(int i)
    {
        p.a(b_byte_array1d_fld, 12, i);
    }

    public final int a()
    {
        return p.a(b_byte_array1d_fld, 12);
    }

    public final void a(int i)
    {
        p.a(b_byte_array1d_fld, 8, i);
    }

    public final int b()
    {
        return p.a(b_byte_array1d_fld, 8);
    }

    public final void a(byte abyte0[])
    {
        int i = abyte0.length;
        p.a(b_byte_array1d_fld, 16, i);
        a_byte_array1d_fld = abyte0;
    }

    public final byte[] a()
    {
        byte abyte0[] = new byte[b_byte_array1d_fld.length + a_byte_array1d_fld.length];
        System.arraycopy(b_byte_array1d_fld, 0, abyte0, 0, b_byte_array1d_fld.length);
        System.arraycopy(a_byte_array1d_fld, 0, abyte0, b_byte_array1d_fld.length, a_byte_array1d_fld.length);
        return abyte0;
    }

    public static h a()
    {
        h h1;
        return h1 = new h(4097);
    }

    public static h b()
    {
        h h1;
        return h1 = new h(4102);
    }

    public static h a(byte abyte0[], int i)
    {
        h h1 = new h(4126);
        byte abyte1[] = new byte[i];
        System.arraycopy(abyte0, 0, abyte1, 0, i);
        h1.a(abyte1);
        return h1;
    }

    public static h a(int i)
    {
        h h1 = new h(4130);
        byte abyte0[];
        p.a(abyte0 = new byte[4], 0, i);
        h1.a(abyte0);
        return h1;
    }

    public static h a(String s, int i)
    {
        h h1 = new h(4113);
        byte abyte0[];
        p.a(abyte0 = new byte[8 + s.length()], 0, s);
        p.a(abyte0, 4 + s.length(), i);
        h1.a(abyte0);
        return h1;
    }

    public static h a(String s)
    {
        h h1 = new h(4128);
        byte abyte0[];
        p.a(abyte0 = new byte[4 + s.length()], 0, s);
        h1.a(abyte0);
        return h1;
    }

    public static h a(int i, int j, String s, String s1, String s2, String s3)
    {
        h h1 = new h(4121);
        byte abyte0[];
        p.a(abyte0 = new byte[24 + s.length() + s1.length() + s2.length() + s3.length()], 0, i);
        p.a(abyte0, 4, j);
        int k = 0;
        k = (k = (k = 8 + (4 + p.a(abyte0, 8, s))) + (4 + p.a(abyte0, k, s1))) + (4 + p.a(abyte0, k, s2));
        p.b(abyte0, k, s3);
        h1.a(abyte0);
        return h1;
    }

    public static h a(int i, int j, int k, String s, String s1, String s2)
    {
        h h1 = new h(4123);
        int l;
        byte abyte0[];
        p.a(abyte0 = new byte[l = 16 + s.length() + 4 + s1.length() + 4 + s2.length()], 0, i);
        p.a(abyte0, 4, j);
        if(k == 101)
            k = 0;
        p.a(abyte0, 8, k);
        int i1 = 0;
        i1 = (i1 = 12 + (4 + p.a(abyte0, 12, s))) + (4 + p.a(abyte0, i1, s1));
        p.a(abyte0, i1, s2);
        h1.a(abyte0);
        return h1;
    }

    public static h b(String s)
    {
        h h1 = new h(4137);
        int i;
        if((i = s.indexOf('@')) == -1)
        {
            return null;
        } else
        {
            String s1 = s.substring(0, i);
            String s2 = s.substring(i + 1);
            byte abyte0[];
            p.a(abyte0 = new byte[16 + s1.length() + s2.length()], 0, 0);
            int j = 0;
            j = 4 + (4 + p.a(abyte0, 4, s1));
            p.a(abyte0, j, 1);
            p.a(abyte0, j + 4, s2);
            h1.a(abyte0);
            return h1;
        }
    }

    public static h a(String as[])
    {
        h h1 = new h(4137);
        int i = 0;
        int j = 0;
        for(int k = 0; k < as.length; k++)
            if(as[k] != null && as[k].length() > 0)
            {
                i++;
                j += as[k].length();
            }

        byte abyte0[] = new byte[8 * i + j];
        if(i + j > 0)
        {
            p.a(abyte0, 0, 0);
            int l = 0;
            for(int i1 = 0; i1 < as.length; i1++)
                if(as[i1] != null && as[i1].length() > 0)
                {
                    p.a(abyte0, l, i1);
                    p.a(abyte0, l + 4, as[i1]);
                    l += 8 + as[i1].length();
                }

            h1.a(abyte0);
        }
        return h1;
    }

    public static h c(String s)
    {
        h h1 = new h(4104);
        int i = s.length();
        byte abyte0[];
        p.a(abyte0 = new byte[16 + i + 1], 0, 1024);
        p.a(abyte0, 4, s);
        p.a(abyte0, 8 + i, " ");
        p.a(abyte0, 8 + i + 4 + 1, 0);
        h1.a(abyte0);
        return h1;
    }

    public static h a(int i, String s, String s1)
    {
        h h1 = new h(4104);
        int j = 8 + s.length() + 4 + s1.length() + 4 + 1;
        if((i & 0x4000) != 0)
            j += v.a(477).length() - 1;
        byte abyte0[];
        p.a(abyte0 = new byte[j], 0, i);
        p.a(abyte0, 4, s);
        int k = 8 + s.length();
        p.a(abyte0, k, s1);
        k += 4 + s1.length();
        if((i & 0x4000) == 0)
            p.a(abyte0, k, " ");
        else
            p.b(abyte0, k, v.a(477));
        h1.a(abyte0);
        return h1;
    }

    public static h a(String s, String s1, int i)
    {
        h h1 = new h(4152);
        StringBuffer stringbuffer;
        (stringbuffer = new StringBuffer()).append("MobileJMEAgent ");
        stringbuffer.append(JAgent.a.getAppProperty("MIDlet-Version"));
        stringbuffer.append(" ");
        stringbuffer.append(JAgent.idNumber);
        stringbuffer.append(" ");
        stringbuffer.append(System.getProperty("microedition.profiles"));
        stringbuffer.append(" ");
        String s2;
        if((s2 = System.getProperty("microedition.platform")) == null || s2.equals("j2me"))
            s2 = System.getProperty("device.model");
        if(s2 == null || s2.equals("j2me"))
            s2 = "General";
        stringbuffer.append(s2);
        if(System.getProperty("microedition.pim.version") != null)
            stringbuffer.append(" pim");
        String s3 = stringbuffer.toString();
        int j;
        byte abyte0[] = new byte[j = 4 + s.length() + 4 + s1.length() + 4 + 4 + s3.length()];
        int k = 0;
        p.a(abyte0, 0, s);
        k = 0 + (4 + s.length());
        p.a(abyte0, k, s1);
        k += 4 + s1.length();
        if(i == 3)
            p.a(abyte0, k, 0x80000001);
        else
            p.a(abyte0, k, i);
        k += 4;
        p.a(abyte0, k, s3);
        h1.a(abyte0);
        return h1;
    }

    public static h a(String s, String s1)
    {
        h h1 = new h(4153);
        if(s.charAt(0) != '+')
            s = "+" + s;
        int i;
        byte abyte0[];
        p.a(abyte0 = new byte[i = 8 + s.length() + 4 + s1.length()], 0, 0);
        p.a(abyte0, 4, s);
        int j = 8 + s.length();
        p.a(abyte0, j, s1.toString());
        h1.a(abyte0);
        return h1;
    }

    public static int a_int_static_fld;
    public static int b_int_static_fld;
    private byte b_byte_array1d_fld[];
    public byte a_byte_array1d_fld[];
}