吾爱汇编

 找回密码
 立即注册

QQ登录

绑定QQ避免忘记帐号

查看: 3380|回复: 14

★★★★★NET网络验证逆向,进入僵局,!!!请大家给逆向分析思路★★★★★

[复制链接]
softwind 发表于 2018-4-23 17:01 | 显示全部楼层 |阅读模式

本站严厉禁止求脱求破行为(包含无自我分析直接求思路),如发现此类求助主题请点击“举报”,让我们共同维护优质的学习环境!


100HB
本帖最后由 softwind 于 2018-4-23 17:01 编辑

最近想逆向一款EXCEL服务器网络验证,程序是NET汇编。目的是想逆向admin登录,只要知道账号输入任何字符都可以进入,不要再看管理员脸色
下面是实战过程,但是遇到了难题进行不下去了
首先查毒,没有病毒
实战.jpg
查汇编语言,郁闷是NET程序 用OD调试总是跑飞
1.jpg 在吾爱汇编上学习NET程序,就学着把程序拖到dnspy里面,发现程序被混淆了 dnspy 载入程序.jpg 又学着用de4dot 去除混淆,测试了一下软件可以正常使用,同时程序也变得简洁
de4dot 去除混淆.jpg 我尝试用自己账户正确密码和错误密码分别测试程序的运行,在Dnspy中点运行
Image 1.jpg
程序在CLASS25 中验证登录,以下详细分析过程
1.jpg
2.jpg
分析267 对应的IL指令
3.jpg
270 代码端计算
4.jpg
270代码对应的IL
2-1.jpg
正确跳转到IL 152
2-2.jpg
输入正确密码跳转346
2-3.jpg
正确密码对应的IL
2-4.jpg
正确对应参数变化
3-1.jpg
错误下参数变化
3-2.jpg
正确下参数
3-3.jpg

4-1.jpg 4-2.jpg
正确跳转到152

密码错误跳转到 371
4-3.jpg

153很关键 错误 跳回102 这样就死循环
159 错误跳回209  GET USER OTP AUTH 路径错误跳转
5-1.jpg
验算正确跳转到154~156
5-2.jpg
210 很关键调 GET MULTIPWD密码
211 密码错误 跳转255
217  错误跳转 255
5-3.jpg
231  验证smethod 路径地址
234 错误跳转254
242  用户名
244  检查密码
245  正确跳转255
6-1.jpg

256 登录状态验证错误跳转258
263  正确跳转 290
268  正确跳转 290
6-2.jpg
293 生成新窗口
297  登录成功

7-1.jpg
  
用正确密码带入
  
用错误密码带入
程序子项
NET 行
IL 行
程序子项
NET 行
IL 行
CLASS25
267
152~153
CLASS25
267
152~153
CLASS25
270
102~132
CLASS25
270
102~132
CLASS25
267
152~153
CLASS25
227
23~28
CLASS25
346
154~156
CLASS25
285
30~31
CLASS25
347
157~161
CLASS25
286
32~34
CLASS25
369
209~217
CLASS25
304
68~75
CLASS25
386
255~256
CLASS25
320
134~135
CLASS25
390
258~268
CLASS25
322
371~379
CLASS25
398
290~293
Errorcontrol
27
1~6
CLASS25
1115
0
Errorcontrol
34
0~7
CLASS25
1116
1~2



CLASS25
1117
3~4



fmchgpwd
20
1~2



basedialogForm
47
2~3



basedialogForm
29
0~1



control
9959
0~6





3-1.jpg
3-2.jpg
3-3.jpg
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
ps122 发表于 2018-4-24 08:40 | 显示全部楼层
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-4-24 13:36 | 显示全部楼层

ps122 发表于 2018-4-24 08:40
把软件发上来看看

感谢大神关注
链接:https://pan.baidu.com/s/11srDSECfXCmOyu9zMneyxQ 密码:ny6e
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-4-24 13:37 | 显示全部楼层

去除混淆的程序如附件,

ES2012-cleaned.rar

1.26 MB, 下载次数: 6, 下载积分: HB -3

吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-4-24 13:45 | 显示全部楼层

CLASS25 反编译源程序如下

using CoESDBAdapterLib;
using ESClient11;
using ESCommon;
using ESCore12;
using ESFpCore;
using ESSa12;
using ESSystem12;
using Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using Microsoft.VisualBasic.FileIO;
using System;
using System.Collections;
using System.Drawing;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using System.Xml;

[StandardModule]
internal sealed class Class25
{
    public static CESType_LoginState cestype_LoginState_0;
    public static CESType_UserOption cestype_UserOption_0;
    public static CESTypeConnState cestypeConnState_0;
    public static Enum97 enum97_0;
    private static ESAgent esagent_0 = new ESAgentClass();
    public static ESGridLayout esgridLayout_0 = new ESGridLayoutClass();
    public static ESHome eshome_0 = new ESHomeClass();
    public static ESM esm_0 = new ESMClass();
    public static ESUser esuser_0 = new ESUserClass();
    public static Frm_CAXMain frm_CAXMain_0;
    public static Hashtable hashtable_0 = new Hashtable();
    public const int int_0 = 2;
    public static object object_0;
    public static Struct17 struct17_0 = new Struct17();
    public static Thread thread_0;
    public static Thread thread_1;
    public static Thread[] thread_2 = new Thread[7];
    public static CESType_ConnState VteUoyhIgnI;

    [STAThread]
    public static void Main()
    {
        try
        {
            Application.EnableVisualStyles();
            string[] commandLineArgs = Environment.GetCommandLineArgs();
            int num = 0;
            if ((commandLineArgs.Length > 1) && (commandLineArgs.Length < 3))
            {
                commandLineArgs = Strings.Split(commandLineArgs[0] + "," + commandLineArgs[1], ",", -1, CompareMethod.Binary);
            }
            struct17_0.bool_0 = false;
            struct17_0.string_0 = "";
            struct17_0.int_0 = 0;
            struct17_0.string_1 = "";
            struct17_0.string_2 = "";
            struct17_0.string_3 = "";
            struct17_0.bool_1 = false;
            struct17_0.int_1 = 0;
            struct17_0.string_4 = "";
            if (commandLineArgs.Length > 1)
            {
                if (commandLineArgs.Length < 3)
                {
                    ErrorControl.EchoMsg(Class42.edOqmccXyXJ("R39601"));
                    return;
                }
                if (commandLineArgs.Length < 4)
                {
                    struct17_0.int_1 = Conversions.ToInteger(commandLineArgs[1]);
                    struct17_0.string_4 = commandLineArgs[2];
                }
                else
                {
                    if (Versioned.IsNumeric(commandLineArgs[1]))
                    {
                        struct17_0.int_1 = Conversions.ToInteger(commandLineArgs[1]);
                        struct17_0.string_4 = commandLineArgs[2];
                        num = 2;
                    }
                    struct17_0.string_0 = commandLineArgs[1 + num];
                    if ((commandLineArgs[0].Length > 0) & Versioned.IsNumeric(commandLineArgs[2 + num]))
                    {
                        struct17_0.int_0 = Conversions.ToInteger(commandLineArgs[2 + num]);
                    }
                    struct17_0.string_1 = commandLineArgs[3 + num];
                    if (commandLineArgs.Length > (4 + num))
                    {
                        struct17_0.string_2 = commandLineArgs[4 + num];
                    }
                    if (commandLineArgs.Length > (5 + num))
                    {
                        int num3 = commandLineArgs.Length - 1;
                        for (int i = 5 + num; i <= num3; i++)
                        {
                            PubFunc.AppItemToList(commandLineArgs[i], ref struct17_0.string_3, ",", false);
                        }
                    }
                    else
                    {
                        struct17_0.bool_1 = true;
                    }
                    struct17_0.bool_0 = true;
                }
            }
            thread_1 = new Thread(new ThreadStart(Class7.smethod_4));
            thread_1.Start();
            smethod_1();
            if (~cestype_LoginState_0.loginOk <= 0)
            {
                frm_CAXMain_0 = new Frm_CAXMain();
                frm_CAXMain_0.WindowState = FormWindowState.Maximized;
                Application.Run(frm_CAXMain_0);
            }
        }
        catch (Exception exception1)
        {
            ProjectData.SetProjectError(exception1);
            Exception exception = exception1;
            Interaction.MsgBox(exception.Message, MsgBoxStyle.ApplicationModal, null);
            ProjectData.ClearProjectError();
        }
        finally
        {
            if (frm_CAXMain_0 != null)
            {
                frm_CAXMain_0.Dispose();
            }
            frm_CAXMain_0 = null;
        }
    }

    private static void MlaUoHqTbeH(string string_0, int int_1, string string_1, string string_2, string string_3, bool bool_0)
    {
        int num2;
        try
        {
            int num3;
        Label_0001:
            ProjectData.ClearProjectError();
            int num = 1;
        Label_0009:
            num3 = 2;
            XmlElement documentElement = null;
        Label_000E:
            num3 = 3;
            XmlDocument document = new XmlDocument();
        Label_0018:
            num3 = 4;
            string file = Application.StartupPath + @"\LoginInfo.xml";
        Label_002C:
            num3 = 5;
            if (!Class3.Class2_0.FileSystem.FileExists(file))
            {
                goto Label_0059;
            }
        Label_0042:
            num3 = 6;
            document.Load(file);
        Label_004E:
            num3 = 7;
            documentElement = document.DocumentElement;
        Label_0059:
            num3 = 9;
            if (documentElement != null)
            {
                goto Label_0071;
            }
        Label_0060:
            num3 = 10;
            documentElement = document.CreateElement("loginInfo");
        Label_0071:
            num3 = 12;
            XmlElement oldChild = (XmlElement) documentElement.SelectSingleNode(".//server[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='" + string_0.ToLower() + "']");
        Label_0096:
            num3 = 13;
            if (oldChild != null)
            {
                goto Label_00B0;
            }
        Label_009D:
            num3 = 14;
            oldChild = document.CreateElement("server");
            goto Label_00C0;
        Label_00B0:
            num3 = 0x10;
        Label_00B4:
            num3 = 0x11;
            documentElement.RemoveChild(oldChild);
        Label_00C0:
            num3 = 0x13;
            XmlElement element5 = oldChild;
        Label_00C7:
            num3 = 20;
            element5.SetAttribute("name", string_0);
        Label_00D8:
            num3 = 0x15;
            element5.SetAttribute("port", int_1.ToString());
        Label_00EF:
            element5 = null;
        Label_00F2:
            num3 = 0x17;
            documentElement.AppendChild(oldChild);
        Label_00FE:
            num3 = 0x18;
            XmlElement element = (XmlElement) oldChild.SelectSingleNode(".//app[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='" + string_1.ToLower() + "']");
        Label_0123:
            num3 = 0x19;
            if (element != null)
            {
                goto Label_013D;
            }
        Label_012A:
            num3 = 0x1a;
            element = document.CreateElement("app");
            goto Label_014D;
        Label_013D:
            num3 = 0x1c;
        Label_0141:
            num3 = 0x1d;
            oldChild.RemoveChild(element);
        Label_014D:
            num3 = 0x1f;
            XmlElement element6 = element;
        Label_0154:
            num3 = 0x20;
            element6.SetAttribute("name", string_1);
        Label_0165:
            element6 = null;
        Label_0168:
            num3 = 0x22;
            oldChild.AppendChild(element);
        Label_0174:
            num3 = 0x23;
            XmlElement element3 = (XmlElement) element.SelectSingleNode(".//user[translate(@name,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='" + string_2.ToLower() + "']");
        Label_0199:
            num3 = 0x24;
            if (element3 != null)
            {
                goto Label_01B3;
            }
        Label_01A0:
            num3 = 0x25;
            element3 = document.CreateElement("user");
            goto Label_01C3;
        Label_01B3:
            num3 = 0x27;
        Label_01B7:
            num3 = 40;
            element.RemoveChild(element3);
        Label_01C3:
            num3 = 0x2a;
            XmlElement element7 = element3;
        Label_01CA:
            num3 = 0x2b;
            element7.SetAttribute("name", string_2);
        Label_01DB:
            num3 = 0x2c;
            if (!bool_0)
            {
                goto Label_0217;
            }
        Label_01E3:
            num3 = 0x2d;
            element7.SetAttribute("withPwd", Conversions.ToString(1));
        Label_01F9:
            num3 = 0x2e;
            element7.SetAttribute("pwd", Class13.smethod_0(string_3, "-)(*^737|?∑)"));
            goto Label_0246;
        Label_0217:
            num3 = 0x30;
        Label_021B:
            num3 = 0x31;
            element7.SetAttribute("withPwd", Conversions.ToString(0));
        Label_0231:
            num3 = 50;
            element7.SetAttribute("pwd", "");
        Label_0246:
            element7 = null;
        Label_0249:
            num3 = 0x35;
            element.AppendChild(element3);
        Label_0255:
            num3 = 0x36;
            if (document.OuterXml.Length != 0)
            {
                goto Label_0279;
            }
        Label_0268:
            num3 = 0x37;
            document.LoadXml(documentElement.OuterXml);
        Label_0279:
            num3 = 0x39;
            document.Save(file);
        Label_0286:
            num3 = 0x3a;
            document = null;
        Label_028D:
            num3 = 0x3b;
            documentElement = null;
        Label_0293:
            num3 = 60;
            oldChild = null;
        Label_0299:
            num3 = 0x3d;
            element = null;
        Label_029F:
            num3 = 0x3e;
            element3 = null;
            goto Label_03FA;
        Label_02AA:
            num2 = 0;
            switch ((num2 + 1))
            {
                case 1:
                    goto Label_0001;

                case 2:
                    goto Label_0009;

                case 3:
                    goto Label_000E;

                case 4:
                    goto Label_0018;

                case 5:
                    goto Label_002C;

                case 6:
                    goto Label_0042;

                case 7:
                    goto Label_004E;

                case 8:
                case 9:
                    goto Label_0059;

                case 10:
                    goto Label_0060;

                case 11:
                case 12:
                    goto Label_0071;

                case 13:
                    goto Label_0096;

                case 14:
                    goto Label_009D;

                case 15:
                case 0x12:
                case 0x13:
                    goto Label_00C0;

                case 0x10:
                    goto Label_00B0;

                case 0x11:
                    goto Label_00B4;

                case 20:
                    goto Label_00C7;

                case 0x15:
                    goto Label_00D8;

                case 0x16:
                    goto Label_00EF;

                case 0x17:
                    goto Label_00F2;

                case 0x18:
                    goto Label_00FE;

                case 0x19:
                    goto Label_0123;

                case 0x1a:
                    goto Label_012A;

                case 0x1b:
                case 30:
                case 0x1f:
                    goto Label_014D;

                case 0x1c:
                    goto Label_013D;

                case 0x1d:
                    goto Label_0141;

                case 0x20:
                    goto Label_0154;

                case 0x21:
                    goto Label_0165;

                case 0x22:
                    goto Label_0168;

                case 0x23:
                    goto Label_0174;

                case 0x24:
                    goto Label_0199;

                case 0x25:
                    goto Label_01A0;

                case 0x26:
                case 0x29:
                case 0x2a:
                    goto Label_01C3;

                case 0x27:
                    goto Label_01B3;

                case 40:
                    goto Label_01B7;

                case 0x2b:
                    goto Label_01CA;

                case 0x2c:
                    goto Label_01DB;

                case 0x2d:
                    goto Label_01E3;

                case 0x2e:
                    goto Label_01F9;

                case 0x2f:
                case 0x33:
                case 0x34:
                    goto Label_0246;

                case 0x30:
                    goto Label_0217;

                case 0x31:
                    goto Label_021B;

                case 50:
                    goto Label_0231;

                case 0x35:
                    goto Label_0249;

                case 0x36:
                    goto Label_0255;

                case 0x37:
                    goto Label_0268;

                case 0x38:
                case 0x39:
                    goto Label_0279;

                case 0x3a:
                    goto Label_0286;

                case 0x3b:
                    goto Label_028D;

                case 60:
                    goto Label_0293;

                case 0x3d:
                    goto Label_0299;

                case 0x3e:
                    goto Label_029F;

                case 0x3f:
                    goto Label_03FA;

                default:
                    goto Label_03EF;
            }
        Label_03B8:
            num2 = num3;
            switch (num)
            {
                case 0:
                    goto Label_03EF;

                case 1:
                    goto Label_02AA;
            }
        }
        catch (object obj1) when (?)
        {
            ProjectData.SetProjectError((Exception) obj1);
            goto Label_03B8;
        }
    Label_03EF:
        throw ProjectData.CreateProjectError(-2146828237);
    Label_03FA:
        if (num2 != 0)
        {
            ProjectData.ClearProjectError();
        }
    }

    public static CESTypeConnState smethod_0()
    {
        CESTypeConnState state2;
        state2.isLocal = VteUoyhIgnI.isLocal;
        state2.server = VteUoyhIgnI.server;
        state2.port = VteUoyhIgnI.port;
        state2.dtcHost = VteUoyhIgnI.dtcHost;
        state2.dbServer = VteUoyhIgnI.dbServer;
        state2.dbPort = VteUoyhIgnI.dbPort;
        state2.db = VteUoyhIgnI.db;
        state2.uid = VteUoyhIgnI.uid;
        state2.pwd = VteUoyhIgnI.pwd;
        state2.pwdPlain = VteUoyhIgnI.pwdPlain;
        state2.dbmsType = (int) VteUoyhIgnI.dbmsType;
        state2.token = VteUoyhIgnI.token;
        state2.assigned = VteUoyhIgnI.assigned;
        state2.clientInfo.computerName = VteUoyhIgnI.computerName;
        state2.clientInfo.ip = VteUoyhIgnI.ip;
        state2.clientInfo.edition = Conversions.ToInteger(VteUoyhIgnI.edition);
        state2.clientInfo.caxAvailable = VteUoyhIgnI.cax;
        state2.loginInfo.appId = VteUoyhIgnI.appId;
        state2.loginInfo.appNo = VteUoyhIgnI.appId;
        state2.loginInfo.sesId = VteUoyhIgnI.sesId;
        state2.loginInfo.userId = VteUoyhIgnI.userId;
        state2.loginInfo.userName = VteUoyhIgnI.userName;
        state2.loginInfo.workDir = VteUoyhIgnI.workDir;
        return state2;
    }

    private static void smethod_1()
    {
        try
        {
            if (smethod_8(struct17_0.bool_0, struct17_0.string_0, struct17_0.int_0, struct17_0.string_1, struct17_0.string_2, struct17_0.string_3, struct17_0.bool_1) && ((struct17_0.int_1 > 0) && (struct17_0.int_1 <= 2)))
            {
                CesControl.smethod_35(struct17_0.string_4);
            }
        }
        catch (Exception exception1)
        {
            ProjectData.SetProjectError(exception1);
            Exception exception = exception1;
            Interaction.MsgBox(exception.Message, MsgBoxStyle.ApplicationModal, null);
            ProjectData.ClearProjectError();
        }
    }

    private static void smethod_10()
    {
    }

    public static bool smethod_11(int int_1, bool bool_0)
    {
        bool flag;
        if (cestype_LoginState_0.loginOk > 0)
        {
            if (!CesControl.smethod_2(int_1))
            {
                return flag;
            }
            esgridLayout_0.conn(ref VteUoyhIgnI);
            esgridLayout_0.Save(esuser_0.Id);
            smethod_12();
        }
        if (cestype_LoginState_0.loginOk > 0)
        {
            if (!esm_0.TerminateSession(VteUoyhIgnI.sesId))
            {
                ErrorControl.EchoError(esm_0.ErrNumber, esm_0.ErrDescription, "", false, 0);
            }
            cestype_LoginState_0.loginOk = 0;
            if (cestype_UserOption_0.waQuicken > 0)
            {
                esm_0.CloseLocalDB();
            }
            if (Class18.frmPub_SendMsg_0 != null)
            {
                Class18.frmPub_SendMsg_0.method_5();
                Class18.frmPub_SendMsg_0.Close();
                Class18.frmPub_SendMsg_0 = null;
            }
        }
        if (!CesControl.smethod_3(bool_0))
        {
            return flag;
        }
        UhhUolXpAvp();
        string directory = VteUoyhIgnI.workDir + @"\" + VteUoyhIgnI.sesId;
        if (Class3.Class2_0.FileSystem.DirectoryExists(directory))
        {
            Class3.Class2_0.FileSystem.DeleteDirectory(directory, DeleteDirectoryOption.DeleteAllContents);
        }
        return true;
    }

    [MethodImpl(MethodImplOptions.NoOptimization)]
    private static void smethod_12()
    {
        int num2;
        try
        {
            int num3;
        Label_0001:
            ProjectData.ClearProjectError();
            int num = 2;
        Label_0008:
            num3 = 2;
            ESSysSetting setting = new ESSysSettingClass();
        Label_0011:
            num3 = 3;
            CESType_ConnState vteUoyhIgnI = VteUoyhIgnI;
        Label_001A:
            num3 = 4;
            vteUoyhIgnI.db = "ESSystem";
        Label_0029:
            num3 = 5;
            setting.conn(ref vteUoyhIgnI);
        Label_0034:
            num3 = 6;
            if (setting.GetOption())
            {
                goto Label_005F;
            }
        Label_003F:
            num3 = 7;
            Information.Err().Raise(setting.errNumber, "getOption", setting.errDescription, null, null);
        Label_005F:
            num3 = 9;
            if (setting.customIcon.Length != 0)
            {
                goto Label_008F;
            }
        Label_0071:
            num3 = 10;
            if (!File.Exists(smethod_13()))
            {
                goto Label_008F;
            }
        Label_0081:
            num3 = 11;
            File.Delete(smethod_13());
        Label_008F:
            num3 = 14;
            setting = null;
            goto Label_018C;
        Label_009A:
            num3 = 0x10;
            ErrorControl.EchoError(Information.Err().Number, Information.Err().Description, "ReadSettings--" + Information.Err().Source, false, 0);
        Label_00CE:
            num3 = 0x11;
            ProjectData.ClearProjectError();
            if (num2 == 0)
            {
                throw ProjectData.CreateProjectError(-2146828268);
            }
            num2 = 0;
            goto Label_008F;
        Label_00EE:
            num2 = 0;
            switch ((num2 + 1))
            {
                case 1:
                    goto Label_0001;

                case 2:
                    goto Label_0008;

                case 3:
                    goto Label_0011;

                case 4:
                    goto Label_001A;

                case 5:
                    goto Label_0029;

                case 6:
                    goto Label_0034;

                case 7:
                    goto Label_003F;

                case 8:
                case 9:
                    goto Label_005F;

                case 10:
                    goto Label_0071;

                case 11:
                    goto Label_0081;

                case 12:
                case 13:
                case 14:
                case 0x12:
                    goto Label_008F;

                case 15:
                case 0x13:
                    goto Label_018C;

                case 0x10:
                    goto Label_009A;

                case 0x11:
                    goto Label_00CE;

                default:
                    goto Label_0181;
            }
        Label_014A:
            num2 = num3;
            switch (num)
            {
                case 0:
                    goto Label_0181;

                case 1:
                    goto Label_00EE;

                case 2:
                    goto Label_009A;
            }
        }
        catch (object obj1) when (?)
        {
            ProjectData.SetProjectError((Exception) obj1);
            goto Label_014A;
        }
    Label_0181:
        throw ProjectData.CreateProjectError(-2146828237);
    Label_018C:
        if (num2 != 0)
        {
            ProjectData.ClearProjectError();
        }
    }

    private static string smethod_13()
    {
        return (Application.StartupPath + @"\formicon.ico");
    }

    [MethodImpl(MethodImplOptions.NoOptimization)]
    public static ESxlTables smethod_14(string string_0, int int_1 = 0)
    {
        ESxlTables tabs = null;
        if (hashtable_0.ContainsKey(string_0))
        {
            tabs = (ESxlTables) hashtable_0[string_0];
            hashtable_0.Remove(string_0);
        }
        if (!esm_0.getBenchTmpTable(string_0, VteUoyhIgnI.userId, int_1, ref tabs))
        {
            Information.Err().Raise(esm_0.ErrNumber, null, esm_0.ErrDescription, null, null);
        }
        hashtable_0.Add(string_0, tabs);
        ESxlTables tables = tabs;
        tabs = null;
        return tables;
    }

    public static void smethod_15()
    {
        new Frm_showTemp().ShowDialog();
    }

    private static void smethod_16()
    {
        thread_2[1] = new Thread(new ThreadStart(Class25.smethod_17));
        thread_2[1].Start();
        thread_2[2] = new Thread(new ThreadStart(Class25.smethod_18));
        thread_2[2].Start();
        thread_2[3] = new Thread(new ThreadStart(Class25.smethod_19));
        thread_2[3].Start();
        thread_2[4] = new Thread(new ThreadStart(Class25.smethod_20));
        thread_2[4].Start();
        thread_2[5] = new Thread(new ThreadStart(Class25.smethod_21));
        thread_2[5].Start();
        thread_2[6] = new Thread(new ThreadStart(Class25.smethod_22));
        thread_2[6].Start();
    }

    private static void smethod_17()
    {
        new Uo_Navigation();
    }

    private static void smethod_18()
    {
        new uo_SM();
    }

    private static void smethod_19()
    {
        new Uo_Design();
    }

    public static bool smethod_2(bool bool_0 = false, string string_0 = "", int int_1 = 0, string string_1 = "", string string_2 = "", string string_3 = "", bool bool_1 = false)
    {
        bool endProc = false;
        Class12.smethod_1();
        if (!bool_0)
        {
            frmPub_Login login = new frmPub_Login();
            login.ShowAndReturn(ref endProc);
            login = null;
        }
        else
        {
            string str = "";
            bool flag2 = false;
            if (Class9.smethod_0().method_5() && Class9.smethod_0().method_0())
            {
                frmPub_Login.smethod_0(string_3, ref string_2, ref str, ref flag2);
            }
            if (!smethod_4(string_0, int_1, string_1, string_2, string_3, false, false, true, bool_1, ref endProc, null, str, flag2))
            {
                return false;
            }
        }
        if (endProc)
        {
            Interaction.Shell(Application.StartupPath + @"\ESAutoUpg.exe " + VteUoyhIgnI.server + "," + Conversions.ToString(VteUoyhIgnI.port) + "," + cestype_LoginState_0.Version + ",2", AppWinStyle.NormalFocus, false, -1);
            return false;
        }
        if (cestype_LoginState_0.loginOk > 0)
        {
            esuser_0.conn(ref VteUoyhIgnI);
            _IDBAccessor dba = null;
            bool withUiCustom = true;
            bool withChargeDept = false;
            bool withOption = true;
            if (!esuser_0.GetOne(1, cestype_LoginState_0.userId, ref dba, true, ref withUiCustom, ref withChargeDept, ref withOption))
            {
                ErrorControl.EchoError(esuser_0.errNumber, esuser_0.errDescription, "", true, 0);
                return false;
            }
            VteUoyhIgnI.AppNo = CESEnum_AppNo.ExcelClient;
            smethod_9();
        }
        return (cestype_LoginState_0.loginOk > 0);
    }

    private static void smethod_20()
    {
        new uo_Data();
    }

    private static void smethod_21()
    {
        new Uo_NFS();
    }

    private static void smethod_22()
    {
        new uo_DMS();
    }

    public static string smethod_23()
    {
        return (Application.StartupPath + @"\Temp");
    }

    [MethodImpl(MethodImplOptions.NoOptimization)]
    private static bool smethod_24(ref bool bool_0, ref string string_0)
    {
        bool flag;
        try
        {
            ESUser user = new ESUserClass();
            frmChgPwd pwd = new frmChgPwd();
            string str = "";
            user.conn(ref VteUoyhIgnI);
            if (!user.checkMustChgPwd(cestype_LoginState_0.userId))
            {
                Information.Err().Raise(user.errNumber, null, user.errDescription, null, null);
            }
            if (user.MustChgPwd)
            {
                ErrorControl.EchoMsg(Class42.edOqmccXyXJ("R52461"));
                if (pwd.method_3(cestype_LoginState_0.userId, ref str) != DialogResult.OK)
                {
                    return flag;
                }
                bool_0 = true;
                string_0 = str;
            }
            flag = true;
        }
        catch (Exception exception1)
        {
            ProjectData.SetProjectError(exception1);
            Exception exception = exception1;
            ErrorControl.EchoError(-1, exception.Message, "", true, 0);
            ProjectData.ClearProjectError();
        }
        return flag;
    }

    public static bool smethod_25()
    {
        return (enum97_0 == ((Enum97) 2));
    }

    private static void smethod_3()
    {
        string str2 = Strings.LCase(Class42.edOqmccXyXJ(Conversions.ToString(0x3e8)));
        if (str2 == "en")
        {
            enum97_0 = (Enum97) 2;
        }
        else if (str2 == "zh-tw")
        {
            enum97_0 = (Enum97) 3;
        }
        else
        {
            enum97_0 = (Enum97) 1;
        }
    }

    [MethodImpl(MethodImplOptions.NoOptimization)]
    public static bool smethod_4(string string_0, int int_1, string string_1, string string_2, string string_3, bool bool_0, bool bool_1, bool bool_2, bool bool_3, ref bool bool_4, Image image_0 = null, string string_4 = "", bool bool_5 = false)
    {
        bool flag = false;
        try
        {
            CESEnum_LoginErrResult result;
            string str3;
            bool flag2 = false;
            bool pwdExpired = false;
            bool useOTPAuth = false;
            string otpTokenId = "";
            bool changePwd = false;
            string newPwd = "";
            string sVerCode = "";
            int uidMatchedByFp = 0;
            string expression = "";
            string str2 = "";
            goto Label_019B;
        Label_0036:
            if ((esagent_0.errNumber - -2147221504) == 0x601f)
            {
                goto Label_03F6;
            }
            uidMatchedByFp = 0;
            if (result == CESEnum_LoginErrResult.kLoginNeedFp)
            {
                long num2;
                EsFpCore core = new EsFpCore();
                string[] feaureArr = Strings.Split(expression, ",", -1, CompareMethod.Binary);
                int matchedIndex = (int) num2;
                num2 = matchedIndex;
                if (core.GatherAndMatchFpFeatures("", "", feaureArr, ref matchedIndex, 0))
                {
                    uidMatchedByFp = Conversions.ToInteger(Strings.Split(str2, ",", -1, CompareMethod.Binary)[(int) num2]);
                    goto Label_010F;
                }
            }
            if (!((result == CESEnum_LoginErrResult.kloginNeedVerCode) | (result == CESEnum_LoginErrResult.kloginVerCodeErr)))
            {
                goto Label_0158;
            }
            if (result == CESEnum_LoginErrResult.kloginVerCodeErr)
            {
                ErrorControl.EchoError(esagent_0.errNumber, esagent_0.errDescription, "", true, 0);
            }
            FrmPub_Verify verify = new FrmPub_Verify();
            if (verify.ShowAndReturn(image_0, ref sVerCode) != DialogResult.OK)
            {
                return false;
            }
            if (sVerCode == "")
            {
                goto Label_0158;
            }
        Label_010F:
            if (flag2 = esagent_0.login(string_0, int_1, string_1, string_2, string_3, ref VteUoyhIgnI, ref cestype_LoginState_0, ref pwdExpired, CESEnum_AppNo.AdminConsole, null, 0, ref useOTPAuth, ref otpTokenId, "", "", -1, changePwd, newPwd, bool_3, ref result, ref expression, ref str2, uidMatchedByFp, sVerCode, string_4, CESEnum_LoginType.logPC))
            {
                goto Label_019B;
            }
            goto Label_0036;
        Label_0158:
            if (!pwdExpired)
            {
                goto Label_0469;
            }
            if (!ErrorControl.EchoMsg(Class42.edOqmccXyXJ(Conversions.ToString(0xcccb)), MessageBoxButtons.OKCancel, "").Equals(DialogResult.OK))
            {
                return flag;
            }
            if (!CMControl.smethod_60(ref newPwd))
            {
                return flag;
            }
            changePwd = true;
        Label_019B:
            if (!flag2)
            {
                goto Label_010F;
            }
            eshome_0.conn(ref VteUoyhIgnI);
            if (eshome_0.useOTPAuth && useOTPAuth)
            {
                bool flag7 = false;
                string pwd = Class34.smethod_3(Class42.edOqmccXyXJ(Conversions.ToString(0xccce)), "", "", "", true, true, ref flag7);
                ESOtpAuth auth = new ESOtpAuthClass();
                int num3 = auth.OtpAuth(VteUoyhIgnI.server, VteUoyhIgnI.port, string_2, pwd, "");
                if (num3 != 0)
                {
                    smethod_7();
                    ErrorControl.EchoError(0xcccd, ErrorControl.ErrMsg(0xcccd, new object[] { num3 }), "", true, 0);
                    return flag;
                }
            }
            if (eshome_0.multiPwd && VteUoyhIgnI.userName.ToUpper().Equals("ADMIN"))
            {
                bool flag6 = false;
                string str8 = Class34.smethod_3(Class42.edOqmccXyXJ(Conversions.ToString(0xccd2)), Class42.edOqmccXyXJ(Conversions.ToString(0xccd3)), "", "", true, true, ref flag6);
                if (flag6)
                {
                    ESUser user2 = new ESUserClass();
                    user2.conn(ref VteUoyhIgnI);
                    if (user2.CheckAddPwd(VteUoyhIgnI.userName, str8))
                    {
                        goto Label_0312;
                    }
                    smethod_7();
                    ErrorControl.EchoMsg(Class42.edOqmccXyXJ(Conversions.ToString(0xccd4)), false);
                }
                return flag;
            }
        Label_0312:
            if (bool_1)
            {
                smethod_6();
            }
            if (((cestype_LoginState_0.regState == 0) && !bool_2) && (cestype_LoginState_0.htdp <= 0))
            {
                ErrorControl.EchoMsg(ErrorControl.ErrMsg(0xccc6, new object[] { cestype_LoginState_0.rd }) + "\r\n" + Class42.edOqmccXyXJ(Conversions.ToString(0xccc7)));
            }
            if (!smethod_24(ref changePwd, ref newPwd))
            {
                smethod_7();
                cestype_LoginState_0.loginOk = 0;
                return flag;
            }
            ESUser user = new ESUserClass();
            user.conn(ref VteUoyhIgnI);
            if (!user.setLoginTime(cestype_LoginState_0.userId))
            {
                Information.Err().Raise(user.errNumber, null, user.errDescription, null, null);
            }
            flag = true;
            if (changePwd)
            {
                string_3 = newPwd;
            }
            smethod_5();
            goto Label_0443;
        Label_03F6:;
            if (ErrorControl.EchoMsg(ErrorControl.ErrMsg(0xccdf, new object[] { cestype_LoginState_0.Version }), ErrorControl.QuestionStyle(), "").Equals(DialogResult.Yes))
            {
                bool_4 = true;
            }
            flag = true;
        Label_0443:
            str3 = string_2;
            if (bool_5)
            {
                str3 = "";
            }
            MlaUoHqTbeH(string_0, int_1, string_1, str3, string_3, bool_0);
            return flag;
        Label_0469:
            ErrorControl.EchoError(esagent_0.errNumber, esagent_0.errDescription, "", true, 0);
        }
        catch (Exception exception1)
        {
            ProjectData.SetProjectError(exception1);
            Exception exception = exception1;
            ErrorControl.EchoError(-1, exception.Message, "", true, 0);
            ProjectData.ClearProjectError();
        }
        return flag;
    }

    private static void smethod_5()
    {
        int num3;
        try
        {
            int num4;
        Label_0001:
            ProjectData.ClearProjectError();
            int num2 = 1;
        Label_0009:
            num4 = 2;
            DBPub pub = new DBPubClass();
        Label_0012:
            num4 = 3;
            IDBAccessor accessor = (IDBAccessor) pub.CreateDBA(ref VteUoyhIgnI);
        Label_0026:
            num4 = 4;
            CESType_LogItem logItem = new CESType_LogItem();
        Label_0031:
            num4 = 5;
            int num = 0x5fe3;
        Label_003A:
            num4 = 6;
            VteUoyhIgnI.AppNo = CESEnum_AppNo.ExcelClient;
        Label_0048:
            num4 = 7;
        Label_004B:
            num4 = 8;
            logItem.sesId = VteUoyhIgnI.sesId;
        Label_005F:
            num4 = 9;
            logItem.AppNo = VteUoyhIgnI.AppNo;
        Label_0074:
            num4 = 10;
            logItem.LogType = CESEnum_LogType.UserOperation;
        Label_0080:
            num4 = 11;
            logItem.FuncName = Class42.edOqmccXyXJ(Conversions.ToString(num));
        Label_0096:
            num4 = 12;
            logItem.OpDesc = ErrorControl.GetErrMsg(Class42.edOqmccXyXJ(Conversions.ToString((int) (num + 1))), new object[] { RuntimeHelpers.GetObjectValue(Interaction.IIf(cestype_LoginState_0.workAsAgent > 0, cestype_LoginState_0.agentName, cestype_LoginState_0.userName)) });
        Label_00EC:
            num4 = 14;
            _IDBAccessor dba = accessor;
            pub.LogAction(ref dba, ref logItem);
            accessor = (IDBAccessor) dba;
        Label_0106:
            num4 = 15;
            accessor.CommitTrans();
        Label_0110:
            num4 = 0x10;
            accessor = null;
            goto Label_01B3;
        Label_011B:
            num3 = 0;
            switch ((num3 + 1))
            {
                case 1:
                    goto Label_0001;

                case 2:
                    goto Label_0009;

                case 3:
                    goto Label_0012;

                case 4:
                    goto Label_0026;

                case 5:
                    goto Label_0031;

                case 6:
                    goto Label_003A;

                case 7:
                    goto Label_0048;

                case 8:
                    goto Label_004B;

                case 9:
                    goto Label_005F;

                case 10:
                    goto Label_0074;

                case 11:
                    goto Label_0080;

                case 12:
                    goto Label_0096;

                case 13:
                case 14:
                    goto Label_00EC;

                case 15:
                    goto Label_0106;

                case 0x10:
                    goto Label_0110;

                case 0x11:
                    goto Label_01B3;

                default:
                    goto Label_01A8;
            }
        Label_0171:
            num3 = num4;
            switch (num2)
            {
                case 0:
                    goto Label_01A8;

                case 1:
                    goto Label_011B;
            }
        }
        catch (object obj1) when (?)
        {
            ProjectData.SetProjectError((Exception) obj1);
            goto Label_0171;
        }
    Label_01A8:
        throw ProjectData.CreateProjectError(-2146828237);
    Label_01B3:
        if (num3 != 0)
        {
            ProjectData.ClearProjectError();
        }
    }

    [MethodImpl(MethodImplOptions.NoOptimization)]
    private static void smethod_6()
    {
        int num3;
        try
        {
            int num = 0;
            ProjectData.ClearProjectError();
            int num2 = 2;
            new frmPub_SelectClientUser().method_3(VteUoyhIgnI.userId, ref num);
            if (num == 0)
            {
                ErrorControl.EchoMsg(Class42.edOqmccXyXJ(Conversions.ToString(0xccca)));
            }
            else
            {
                ESSessions sessions = new ESSessionsClass();
                sessions.conn(ref VteUoyhIgnI);
                if (!sessions.OnBehalf(VteUoyhIgnI.sesId, ref num))
                {
                    Information.Err().Raise(sessions.errNumber, null, sessions.errDescription, null, null);
                }
                sessions = null;
                ESUser user2 = new ESUserClass();
                user2.conn(ref VteUoyhIgnI);
                _IDBAccessor dba = null;
                bool withUiCustom = false;
                bool withChargeDept = false;
                bool withOption = false;
                if (!user2.GetOne(1, num, ref dba, false, ref withUiCustom, ref withChargeDept, ref withOption))
                {
                    Information.Err().Raise(user2.errNumber, null, user2.errDescription, null, null);
                }
                VteUoyhIgnI.userId = num;
                VteUoyhIgnI.userName = user2.Name;
                cestype_LoginState_0.agentId = cestype_LoginState_0.userId;
                cestype_LoginState_0.agentName = cestype_LoginState_0.userName;
                cestype_LoginState_0.userId = num;
                cestype_LoginState_0.userName = user2.Name;
                cestype_LoginState_0.userLogin = user2.login;
                cestype_LoginState_0.workAsAgent = -1;
                cestype_LoginState_0.isAdmin = (short) -(user2.isAdministrator > false);
                cestype_LoginState_0.isDeptAdmin = (short) -(user2.isDeptAdmin > false);
                cestype_LoginState_0.isDesigner = (short) -(user2.isDesigner > false);
                cestype_LoginState_0.isNoticeAdmin = (short) -(user2.isNoticeAdmin > false);
                cestype_LoginState_0.isProcessAdmin = (short) -(user2.isProcAdmin > false);
                user2 = null;
            }
            goto Label_0220;
        Label_01B8:
            ErrorControl.EchoError(Information.Err().Number, Information.Err().Description, "", true, 0);
            goto Label_0220;
        Label_01DB:
            num3 = -1;
            switch (num2)
            {
                case 0:
                case 1:
                    goto Label_0215;

                case 2:
                    goto Label_01B8;
            }
        }
        catch (object obj1) when (?)
        {
            ProjectData.SetProjectError((Exception) obj1);
            goto Label_01DB;
        }
    Label_0215:
        throw ProjectData.CreateProjectError(-2146828237);
    Label_0220:
        if (num3 != 0)
        {
            ProjectData.ClearProjectError();
        }
    }

    private static void smethod_7()
    {
        ESM esm = new ESMClass();
        esm.connect(ref VteUoyhIgnI, "", 1);
        esm.TerminateSession(VteUoyhIgnI.sesId);
        esm = null;
    }

    public static bool smethod_8(bool bool_0 = false, string string_0 = "", int int_1 = 0, string string_1 = "", string string_2 = "", string string_3 = "", bool bool_1 = false)
    {
        smethod_3();
        if (!smethod_2(bool_0, string_0, int_1, string_1, string_2, string_3, bool_1))
        {
            return false;
        }
        if (!Class3.Class2_0.FileSystem.DirectoryExists(VteUoyhIgnI.workDir))
        {
            Class3.Class2_0.FileSystem.CreateDirectory(VteUoyhIgnI.workDir);
        }
        esm_0.connect(ref VteUoyhIgnI, "", 1);
        if (!esm_0.OpenLocalDB())
        {
            smethod_7();
            Interaction.MsgBox(esm_0.ErrDescription, MsgBoxStyle.ApplicationModal, null);
            return false;
        }
        return true;
    }

    private static void smethod_9()
    {
        VteUoyhIgnI.workDir = smethod_23();
        esuser_0.conn(ref VteUoyhIgnI);
        int id = 0;
        cestype_UserOption_0 = esuser_0.GetOption(ref id);
        esgridLayout_0.conn(ref VteUoyhIgnI);
        esgridLayout_0.getInfo(esuser_0.Id);
        if (esuser_0.errNumber != 0)
        {
            ErrorControl.EchoError(esuser_0.errNumber, esuser_0.errDescription, "", true, 0);
        }
        else
        {
            cestype_UserOption_0.pwdNoChange = (short) -(esuser_0.pwdNoChange > false);
            try
            {
                Class18.frmPub_SendMsg_0 = new frmPub_SendMsg();
                Class18.frmPub_SendMsg_0.method_4();
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                Interaction.MsgBox(exception.Message, MsgBoxStyle.ApplicationModal, null);
                ProjectData.ClearProjectError();
            }
            string directory = VteUoyhIgnI.workDir + @"\" + VteUoyhIgnI.sesId;
            if (Class3.Class2_0.FileSystem.DirectoryExists(directory))
            {
                Class3.Class2_0.FileSystem.DeleteDirectory(directory, DeleteDirectoryOption.DeleteAllContents);
            }
            Class3.Class2_0.FileSystem.CreateDirectory(directory);
            cestypeConnState_0 = smethod_0();
            cestypeConnState_0.loginInfo.userLogin = esuser_0.login;
            cestypeConnState_0.loginInfo.isAdmin = esuser_0.isAdministrator;
        }
    }

    private static void UhhUolXpAvp()
    {
        esuser_0 = null;
        esuser_0 = new ESUserClass();
        eshome_0 = null;
        eshome_0 = new ESHomeClass();
        esagent_0 = null;
        esagent_0 = new ESAgentClass();
        esm_0 = null;
        esm_0 = new ESMClass();
        hashtable_0 = null;
        hashtable_0 = new Hashtable();
        esgridLayout_0 = null;
        esgridLayout_0 = new ESGridLayoutClass();
    }

    public enum Enum96
    {
    }

    public enum Enum97
    {
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct Struct17
    {
        public bool bool_0;
        public string string_0;
        public int int_0;
        public string string_1;
        public string string_2;
        public string string_3;
        public bool bool_1;
        public int int_1;
        public string string_4;
    }
}

吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-4-26 11:04 | 显示全部楼层
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-4-27 09:00 | 显示全部楼层

这个软件是现在比较流行的软件EXCEL服务器
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-4-28 07:41 | 显示全部楼层

跪求高手指点
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-4-29 07:54 | 显示全部楼层

可怜啊,现在论坛好冷清
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| softwind 发表于 2018-5-2 10:57 | 显示全部楼层

求围观,求帮忙
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

警告:本站严惩灌水回复,尊重自己从尊重他人开始!

1层
2层
3层
4层
5层
6层
7层
8层
9层
10层

免责声明

吾爱汇编(www.52hb.com)所讨论的技术及相关工具仅限用于研究学习,皆在提高软件产品的安全性,严禁用于不良动机。任何个人、团体、组织不得将其用于非法目的,否则,一切后果自行承担。吾爱汇编不承担任何因为技术滥用所产生的连带责任。吾爱汇编内容源于网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除。如有侵权请邮件或微信与我们联系处理。

站长邮箱:SharkHeng@sina.com
站长QQ:1140549900


QQ|RSS|手机版|小黑屋|帮助|吾爱汇编 ( 京公网安备11011502005403号 , 京ICP备20003498号-6 )|网站地图

Powered by Discuz!

吾爱汇编 www.52hb.com

快速回复 返回顶部 返回列表