代码地址过长.请帮忙看下地址为:
http://blog.csdn.net/xlincn/archive/2008/10/28/3164572.aspx分不是问题,小弟需要这段代码学习,请各位大哥帮下忙,先谢谢了

解决方案 »

  1.   

    #include <string>  
    #include <vector>  
    #include <algorithm>  
    #include <iostream>  
    #include <fstream>  
    using namespace std;  
      
    char ranbuff[0xFFF];  
      
    char readfilebuff[0x28+0x28+0x70000];  
    char buff2[0x900000];  
    char listbuff[0x90000];  
    char wbuff[0x900000];  
      
    DWORD listadd;  
    DWORD listlen;  
      
    HANDLE hFile;  
    DWORD dwReadSize = 0;  
      
    string rpath;  
    string wpath;  
      
      
    int fun_010C2EC0(const char* name,int code)  
    {  
      
        char* a = ranbuff;  
        __asm  
        {  
            push esi  
                /*10C2EC1*/  mov    esi, name  
                /*10C2EC5*/  mov    cl, byte ptr [esi]  
            /*10C2EC7*/  test    cl, cl  
                /*10C2EC9*/  mov    eax, 0x7FED7FED  
                /*10C2ECE*/  mov    edx, 0xEEEEEEEE  
                /*10C2ED3*/  je      x2  
                /*10C2ED5*/  push    ebx  
                /*10C2ED6*/  push    ebp  
                /*10C2ED7*/  push    edi  
                /*10C2ED8*/  mov    edi, code  
                /*10C2EDC*/  shl    edi, 8  
    x1:  
            /*10C2EE0*/  add    eax, edx  
                /*10C2EE2*/  imul    edx, edx, 0x21  
                /*10C2EE5*/  movsx  ecx, cl  
                /*10C2EE8*/  lea    ebx, dword ptr [edi+ecx]  
      
            push edi  
                mov edi,a  
                /*10C2EEB*/  mov    edi, dword ptr [ebx*4+edi]  
            /*10C2EF2*/  inc    esi  
                /*10C2EF3*/  add    edx, ecx  
                /*10C2EF5*/  mov    cl, byte ptr [esi]  
            /*10C2EF7*/  xor    eax, edi  
                pop edi  
                /*10C2EF9*/  test    cl, cl  
                /*10C2EFB*/  lea    edx, dword ptr [edx+eax+3]  
            /*10C2EFF*/  jnz    x1  
                /*10C2F01*/  pop    edi  
                /*10C2F02*/  pop    ebp  
                /*10C2F03*/  pop    ebx  
    x2:  
            /*10C2F04*/  pop    esi  
      
      
      
      
        }  
      
      
    }  
      
      
      
    int fun_010C2F10(const char* name)  
    {  
      
        if(name == NULL)  
            return 0;  
      
        int a1,a2,a3;  
      
        a1 = fun_010C2EC0(name,1);  
        a2 = fun_010C2EC0(name,2);  
        a3 = fun_010C2EC0(name,3);  
      
        __asm{  
      
            push edi  
                push esi  
      
                mov edi,a1  
                mov ebx,a2  
                mov ecx,a3  
      
                /*10C2F44*/  and    ecx, 0x7FFF  
                /*10C2F4A*/  mov    eax, ecx  
    x1:  
            /*10C2F50*/  lea    edx, dword ptr [eax+eax*2]  
            shl edx,2  
                add edx,0x50  
                /*10C2F53*/  lea    esi, dword ptr [readfilebuff+edx]  
            /*10C2F57*/  mov    edx, dword ptr [esi+8]  
            /*10C2F5A*/  shr    edx, 0x1F  
                /*10C2F5D*/  test    dl, 1  
                /*10C2F60*/  je      x2  
                /*10C2F62*/  cmp    dword ptr [esi], edi  
                /*10C2F64*/  jnz    x2  
                /*10C2F66*/  cmp    dword ptr [esi+4], ebx  
                /*10C2F69*/  je      x3  
    x2:  
            /*10C2F6B*/  inc    eax  
                /*10C2F6C*/  and    eax, 0x7FFF  
                /*10C2F71*/  cmp    eax, ecx  
                /*10C2F73*/  jnz    x1  
                /*10C2F75*/  or      eax, 0xFFFFFFFF  
    x3:  
            pop    edi  
                pop    esi  
      
      
      
        }  
      
    }  
      
      
      
    void fun_010C3030()  
    {  
        char* a = ranbuff;  
        char* b = ranbuff + 0x400;  
        char* c = ranbuff + 0x800;  
        __asm{  
            /*10C3030*/  push    ebx  
                /*10C3031*/  push    esi  
                /*10C3032*/  mov    ebx, ecx  
                /*10C3034*/  push    edi  
                /*10C3035*/  mov    ecx, 0x400  
                /*10C303A*/  xor    eax, eax  
                /*10C303C*/  mov    edi, a  
                /*10C3041*/  rep    stos dword ptr es:[edi]  
            /*10C3043*/  mov    edx, 0x100001  
                /*10C3048*/  mov    ecx, b  
                /*10C304D*/  lea    ecx, dword ptr [ecx]  
    x1:  
            /*10C3050*/  mov    eax, edx  
                /*10C3052*/  imul    eax, eax, 0x7D  
                /*10C3055*/  add    eax, 3  
                /*10C3058*/  xor    edx, edx  
                /*10C305A*/  mov    esi, 0x2AAAAB  
                /*10C305F*/  div    esi  
                /*10C3061*/  mov    edi, 0x2AAAAB  
                /*10C3066*/  add    ecx, 4  
                /*10C3069*/  mov    eax, edx  
                /*10C306B*/  mov    esi, eax  
                /*10C306D*/  imul    eax, eax, 0x7D  
                /*10C3070*/  add    eax, 3  
                /*10C3073*/  xor    edx, edx  
                /*10C3075*/  div    edi  
                /*10C3077*/  shl    esi, 0x10  
                /*10C307A*/  mov    eax, edx  
                /*10C307C*/  imul    eax, eax, 0x7D  
                /*10C307F*/  add    eax, 3  
                /*10C3082*/  and    edx, 0x0FFFF  
                /*10C3088*/  or      edx, esi  
                /*10C308A*/  mov    dword ptr [ecx-0x404], edx  
                /*10C3090*/  xor    edx, edx  
                /*10C3092*/  mov    esi, edi  
                /*10C3094*/  div    esi  
                /*10C3096*/  mov    eax, edx  
                /*10C3098*/  mov    esi, eax  
                /*10C309A*/  imul    eax, eax, 0x7D  
                /*10C309D*/  add    eax, 3  
                /*10C30A0*/  xor    edx, edx  
                /*10C30A2*/  div    edi  
                /*10C30A4*/  shl    esi, 0x10  
                /*10C30A7*/  mov    eax, edx  
                /*10C30A9*/  imul    eax, eax, 0x7D  
                /*10C30AC*/  and    edx, 0x0FFFF  
                /*10C30B2*/  or      edx, esi  
                /*10C30B4*/  add    eax, 3  
                /*10C30B7*/  mov    dword ptr [ecx-4], edx  
                /*10C30BA*/  xor    edx, edx  
                /*10C30BC*/  mov    esi, edi  
                /*10C30BE*/  div    esi  
                /*10C30C0*/  mov    eax, edx  
                /*10C30C2*/  mov    esi, eax  
                /*10C30C4*/  imul    eax, eax, 0x7D  
                /*10C30C7*/  add    eax, 3  
                /*10C30CA*/  xor    edx, edx  
                /*10C30CC*/  div    edi  
                /*10C30CE*/  shl    esi, 0x10  
                /*10C30D1*/  mov    eax, edx  
                /*10C30D3*/  imul    eax, eax, 0x7D  
                /*10C30D6*/  and    edx, 0x0FFFF  
                /*10C30DC*/  or      edx, esi  
                /*10C30DE*/  add    eax, 3  
                /*10C30E1*/  mov    dword ptr [ecx+0x3FC], edx  
                /*10C30E7*/  xor    edx, edx  
                /*10C30E9*/  mov    esi, edi  
                /*10C30EB*/  div    esi  
                /*10C30ED*/  mov    eax, edx  
                /*10C30EF*/  mov    esi, eax  
                /*10C30F1*/  imul    eax, eax, 0x7D  
                /*10C30F4*/  add    eax, 3  
                /*10C30F7*/  xor    edx, edx  
                /*10C30F9*/  div    edi  
                /*10C30FB*/  shl    esi, 0x10  
                /*10C30FE*/  mov    eax, edx  
                /*10C3100*/  and    eax, 0x0FFFF  
                /*10C3105*/  or      eax, esi  
                /*10C3107*/  cmp    ecx, c  
                /*10C310D*/  mov    dword ptr [ecx+0x7FC], eax  
                /*10C3113*/  jl      x1  
                /*10C3119*/  pop    edi  
                /*10C311A*/  pop    esi  
                /*10C311B*/  mov    eax, ebx  
                /*10C311D*/  pop    ebx  
        }  
      
    }  
      
      
      
      
    void fun_010E40E0(int a)  
    {  
      
        __asm{  
            mov edi,a  
                /*10E40E6*/  lea    edx, dword ptr [edi+edi*2]  
            /*10E40E9*/  lea    eax, dword ptr [readfilebuff+edx*4+0x50]  
            /*10E40ED*/  mov    eax, dword ptr [eax+8]  
            /*10E40F0*/  and    eax, 0x3FFFFFFF  
                /*10E40F5*/  lea    eax, dword ptr [eax+eax*2]  
            /*10E40F8*/  lea    ebx, dword ptr [buff2+eax*4]  
      
            mov  eax, dword ptr [ebx]  
      
            mov  listadd,eax  
                mov  eax, dword ptr [ebx+4]  
      
            mov  listlen,eax  
        }  
      
      
    }  
      

  2.   

    void writef(string name)  
    {  
        transform (name.begin(),name.end(), name.begin(), tolower);    
        fun_010E40E0(fun_010C2F10(name.c_str()));  
      
      
        string path = wpath;  
        string _name = name;  
      
        while (name.find("/") != string::npos)  
        {              
            path.append(name.substr(0,name.find("/")));  
            ::CreateDirectory(path.c_str(),NULL);  
            path = wpath;  
            name.replace(name.find("/"),1,"\\");  
        }    
        path.append(name);  
        ::SetFilePointer(hFile, 0, NULL, FILE_BEGIN);  
        ::SetFilePointer(hFile, listadd, NULL, FILE_BEGIN);  
        ::ReadFile(hFile,&wbuff,listlen,&dwReadSize,NULL);  
        HANDLE hwFile = ::CreateFile(path.c_str(), GENERIC_WRITE|GENERIC_READ,0,NULL,  CREATE_ALWAYS,    FILE_ATTRIBUTE_NORMAL,  NULL);    
        ::WriteFile(hwFile,wbuff,listlen,&dwReadSize,NULL);  
    }  
      
      
    void writelistfile()  
    {  
        fun_010E40E0(fun_010C2F10("(list)"));  
        ::SetFilePointer(hFile, 0, NULL, FILE_BEGIN);  
        ::SetFilePointer(hFile, listadd, NULL, FILE_BEGIN);  
        ::ReadFile(hFile,&listbuff,listlen,&dwReadSize,NULL);  
        string path = wpath;  
        path.append("(list)");  
        HANDLE hwFile = ::CreateFile(path.c_str(), GENERIC_WRITE|GENERIC_READ,0,NULL,  CREATE_ALWAYS,    FILE_ATTRIBUTE_NORMAL,  NULL);    
        ::WriteFile(hwFile,listbuff,listlen,&dwReadSize,NULL);  
    }  
      
      
    void axp(string _rpath)  
    {  
      
        int aa;  
        hFile = ::CreateFile(_rpath.c_str(), GENERIC_READ,0,NULL,  OPEN_EXISTING,    FILE_ATTRIBUTE_NORMAL,  NULL);    
        ::ReadFile(hFile,&readfilebuff[0x28],0x60028,&dwReadSize,NULL);  
        ::SetFilePointer(hFile, 0x60028, NULL, FILE_BEGIN);  
        __asm{  
      
            pushad  
      
                /*10C222F*/  mov    eax, dword ptr [readfilebuff+0x3C]  
            /*10C223F*/  lea    eax, dword ptr [eax+eax*2]  
            /*10C2242*/  shl    eax, 2  
                mov aa,eax  
      
      
                popad  
      
      
        }  
        ::ReadFile(hFile,&buff2,aa,&dwReadSize,NULL);  
        fun_010C3030();  
        writelistfile();  
        string liststr;  
        vector<string> v;  
      
        for(DWORD i=0;i<listlen;i++)  
        {  
            if(listbuff != 0xA)  
            {  
                liststr += listbuff;  
            }else{  
                v.push_back(liststr);  
                liststr = "";  
            }  
        }  
      
      
        vector<string>::iterator iter;  
        string tem;  
        string tem1;  
        string::size_type loc;  
        for( iter = v.begin(); iter != v.end(); iter++ ) {  
      
            tem = (*iter);  
            loc = tem.find("|");  
            if( loc != string::npos)  
            {  
                tem1 = tem.substr(0,loc);  
                writef(tem1);  
      
            }  
      
        }    
      
    }  
      
      
      
      
    int _tmain(int argc, _TCHAR* argv[])  
    {  
        printf("天龙八部资源提取小工具\n");  
        string d= "F:\\TLBB\\Data";  
        string p = d + "\\axp";  
        ::CreateDirectory(p.c_str(),NULL);  
        wpath = p+"\\Brushes.axp\\";  
        ::CreateDirectory(wpath.c_str(),NULL);  
        axp(rpath);  
        printf("Brushes.axp提取成功\n")  
            getchar();  
        return 0;  
    }
      

  3.   

    另外,有能力把这俩段代码整理得和
    http://topic.csdn.net/u/20081129/16/7590575c-b350-4ee6-89bb-12f0ddb85264.html
    这个帖一样的  人民币也不是问题...
      

  4.   

    这种体力活多无聊,有源码还不如直接编译成.obj再链接呢
      

  5.   

    var ranbuff: array[0.. $0FFF] of char;
     readfilebuff:array[0.. $28+$28+$70000] of char;
     buff2 :array[0..$900000]  of char;
     listbuff :array[0..$90000] of char;
     wbuff  :array[0..$900000]  of char;
     listadd :DWORD;
     listlen :DWORD; hFile   :tHANDLE  ;
     dwReadSize :DWORD; rpath :string;
     wpath :string;
      

  6.   

    FUNCTION fun_010C2EC0(const  name:pchar; code:integer):INTEGER;STDCALL;
    var a:pchar;
    BEGIN  
        a:= ranbuff;
        asm
            push esi
                {10C2EC1}  mov    esi, name
                {10C2EC5}  mov    cl, byte ptr [esi]
                {10C2EC7}  test    cl, cl
                {10C2EC9}  mov    eax,  $7FED7FED
                {10C2ECE}  mov    edx,  $EEEEEEEE
                {10C2ED3}  je      @x2
                {10C2ED5}  push    ebx
                {10C2ED6}  push    ebp
                {10C2ED7}  push    edi
                {10C2ED8}  mov    edi, code
                {10C2EDC}  shl    edi, 8
    @x1:
                {10C2EE0}  add    eax, edx
                {10C2EE2}  imul    edx, edx,  $21
                {10C2EE5}  movsx  ecx, cl
                {10C2EE8}  lea    ebx, dword ptr [edi+ecx]                       push edi
                            mov edi,a
                {10C2EEB}  mov    edi, dword ptr [ebx*4+edi]
                {10C2EF2}  inc    esi
                {10C2EF3}  add    edx, ecx
                {10C2EF5}  mov    cl, byte ptr [esi]
                {10C2EF7}  xor    eax, edi
                          pop edi
                {10C2EF9}  test    cl, cl
                {10C2EFB}  lea    edx, dword ptr [edx+eax+3]
                {10C2EFF}  jnz    @x1
                {10C2F01}  pop    edi
                {10C2F02}  pop    ebp
                {10C2F03}  pop    ebx
    @x2:
            {10C2F04}  pop    esi
        END
    END
      

  7.   

    FUNCTION fun_010C2EC0(const  name:pchar; code:integer):INTEGER;STDCALL;
    var a:pchar;
    BEGIN  
        a:= ranbuff;
        asm
            push esi
                {10C2EC1}  mov    esi, name
                {10C2EC5}  mov    cl, byte ptr [esi]
                {10C2EC7}  test    cl, cl
                {10C2EC9}  mov    eax,  $7FED7FED
                {10C2ECE}  mov    edx,  $EEEEEEEE
                {10C2ED3}  je      @x2
                {10C2ED5}  push    ebx
                {10C2ED6}  push    ebp
                {10C2ED7}  push    edi
                {10C2ED8}  mov    edi, code
                {10C2EDC}  shl    edi, 8
    @x1:
                {10C2EE0}  add    eax, edx
                {10C2EE2}  imul    edx, edx,  $21
                {10C2EE5}  movsx  ecx, cl
                {10C2EE8}  lea    ebx, dword ptr [edi+ecx]                       push edi
                            mov edi,a
                {10C2EEB}  mov    edi, dword ptr [ebx*4+edi]
                {10C2EF2}  inc    esi
                {10C2EF3}  add    edx, ecx
                {10C2EF5}  mov    cl, byte ptr [esi]
                {10C2EF7}  xor    eax, edi
                          pop edi
                {10C2EF9}  test    cl, cl
                {10C2EFB}  lea    edx, dword ptr [edx+eax+3]
                {10C2EFF}  jnz    @x1
                {10C2F01}  pop    edi
                {10C2F02}  pop    ebp
                {10C2F03}  pop    ebx
    @x2:
            {10C2F04}  pop    esi
        END
    END
      

  8.   

    楼上的兄台好象被csdn防灌水搞了.你看可以发到
      

  9.   


    function fun_010C2F10(const  name:pchar):integer;stdcall;
    var a1,a2,a3:integer;
    BEGIN    if(name = NULL)  then begin result:=0;exit;end;
        a1 := fun_010C2EC0(name,1);
        a2 := fun_010C2EC0(name,2);
        a3 := fun_010C2EC0(name,3);
      
        asm
      
            push edi  
                push esi  
      
                mov edi,a1  
                mov ebx,a2  
                mov ecx,a3  
      
                {10C2F44}  and    ecx,  $7FFF  
                {10C2F4A}  mov    eax, ecx  
    @x1:
            {10C2F50}  lea    edx, dword ptr [eax+eax*2]  
            shl edx,2  
                add edx, $50  
                {10C2F53}  lea    esi, dword ptr [readfilebuff+edx]  
            {10C2F57}  mov    edx, dword ptr [esi+8]
            {10C2F5A}  shr    edx,  $1F
                {10C2F5D}  test    dl, 1  
                {10C2F60}  je      @x2
                {10C2F62}  cmp    dword ptr [esi], edi  
                {10C2F64}  jnz    @x2
                {10C2F66}  cmp    dword ptr [esi+4], ebx
                {10C2F69}  je      @x3
    @x2:
            {10C2F6B}  inc    eax
                {10C2F6C}  and    eax,  $7FFF
                {10C2F71}  cmp    eax, ecx
                {10C2F73}  jnz    @x1
                {10C2F75}  or      eax,  $FFFFFFFF
    @x3:
            pop    edi
                pop    esi    END
      
    END;procedure fun_010C3030;
     var a,b,c:pchar;
    BEGIN
         a := ranbuff;
         b:= ranbuff +  $400;
         c := ranbuff +  $800;
        asm
            {10C3030}  push    ebx  
                {10C3031}  push    esi  
                {10C3032}  mov    ebx, ecx  
                {10C3034}  push    edi  
                {10C3035}  mov    ecx,  $400  
                {10C303A}  xor    eax, eax  
                {10C303C}  mov    edi, a  
                {10C3041}  rep    stos dword ptr es:[edi]  
            {10C3043}  mov    edx,  $100001  
                {10C3048}  mov    ecx, b  
                {10C304D}  lea    ecx, dword ptr [ecx]  
    @x1:
            {10C3050}  mov    eax, edx
                {10C3052}  imul    eax, eax,  $7D  
                {10C3055}  add    eax, 3  
                {10C3058}  xor    edx, edx  
                {10C305A}  mov    esi,  $2AAAAB  
                {10C305F}  div    esi  
                {10C3061}  mov    edi,  $2AAAAB  
                {10C3066}  add    ecx, 4  
                {10C3069}  mov    eax, edx  
                {10C306B}  mov    esi, eax  
                {10C306D}  imul    eax, eax,  $7D  
                {10C3070}  add    eax, 3  
                {10C3073}  xor    edx, edx  
                {10C3075}  div    edi  
                {10C3077}  shl    esi,  $10  
                {10C307A}  mov    eax, edx  
                {10C307C}  imul    eax, eax,  $7D  
                {10C307F}  add    eax, 3  
                {10C3082}  and    edx,  $0FFFF  
                {10C3088}  or      edx, esi  
                {10C308A}  mov    dword ptr [ecx- $404], edx  
                {10C3090}  xor    edx, edx  
                {10C3092}  mov    esi, edi  
                {10C3094}  div    esi  
                {10C3096}  mov    eax, edx  
                {10C3098}  mov    esi, eax  
                {10C309A}  imul    eax, eax,  $7D  
                {10C309D}  add    eax, 3  
                {10C30A0}  xor    edx, edx  
                {10C30A2}  div    edi  
                {10C30A4}  shl    esi,  $10  
                {10C30A7}  mov    eax, edx  
                {10C30A9}  imul    eax, eax,  $7D  
                {10C30AC}  and    edx,  $0FFFF  
                {10C30B2}  or      edx, esi  
                {10C30B4}  add    eax, 3  
                {10C30B7}  mov    dword ptr [ecx-4], edx  
                {10C30BA}  xor    edx, edx  
                {10C30BC}  mov    esi, edi  
                {10C30BE}  div    esi  
                {10C30C0}  mov    eax, edx  
                {10C30C2}  mov    esi, eax  
                {10C30C4}  imul    eax, eax,  $7D  
                {10C30C7}  add    eax, 3  
                {10C30CA}  xor    edx, edx  
                {10C30CC}  div    edi  
                {10C30CE}  shl    esi,  $10  
                {10C30D1}  mov    eax, edx  
                {10C30D3}  imul    eax, eax,  $7D  
                {10C30D6}  and    edx,  $0FFFF  
                {10C30DC}  or      edx, esi  
                {10C30DE}  add    eax, 3  
                {10C30E1}  mov    dword ptr [ecx+ $3FC], edx  
                {10C30E7}  xor    edx, edx  
                {10C30E9}  mov    esi, edi  
                {10C30EB}  div    esi  
                {10C30ED}  mov    eax, edx  
                {10C30EF}  mov    esi, eax  
                {10C30F1}  imul    eax, eax,  $7D  
                {10C30F4}  add    eax, 3  
                {10C30F7}  xor    edx, edx  
                {10C30F9}  div    edi  
                {10C30FB}  shl    esi,  $10  
                {10C30FE}  mov    eax, edx  
                {10C3100}  and    eax,  $0FFFF  
                {10C3105}  or      eax, esi  
                {10C3107}  cmp    ecx, c  
                {10C310D}  mov    dword ptr [ecx+ $7FC], eax  
                {10C3113}  jl      @x1
                {10C3119}  pop    edi  
                {10C311A}  pop    esi  
                {10C311B}  mov    eax, ebx  
                {10C311D}  pop    ebx  
        END  
      
    END ;  
      
      
    procedure fun_010E40E0( a:integer);stdcall;
    BEGIN  
      
        asm        mov edi,a  
                {10E40E6}  lea    edx, dword ptr [edi+edi*2]  
            {10E40E9}  lea    eax, dword ptr [readfilebuff+edx*4+ $50]  
            {10E40ED}  mov    eax, dword ptr [eax+8]  
            {10E40F0}  and    eax,  $3FFFFFFF
                {10E40F5}  lea    eax, dword ptr [eax+eax*2]  
            {10E40F8}  lea    ebx, dword ptr [buff2+eax*4]
      
            mov  eax, dword ptr [ebx]  
      
            mov  listadd,eax  
                mov  eax, dword ptr [ebx+4]  
      
            mov  listlen,eax  
        END  
      
      
    END ;
      

  10.   

    只要有人回复了,我就能回复.
     PROCEDURE writef(name0:string);STDCALL;
      var name:string;
          path,_name:string;
          i:integer;
          hwFile :Thandle;
    BEGIN
        name:=LowerCase(name0);    fun_010E40E0(fun_010C2F10(pchar(name)));
      
      
         path := wpath;
         _name := name;
        i:= pos('/',name);
        while (i>0 ) do
        BEGIN
            path:=path+copy(name,1,i);
            CreateDirectory(pchar( path),nil);
            path := wpath;
            name[i]:='\';
            i:= pos('/',name);
        END ;
        path:=path+name;    SetFilePointer( hFile, 0, nil, FILE_BEGIN);
        SetFilePointer(hFile, listadd, nil, FILE_BEGIN);
        ReadFile(hFile,wbuff,listlen,dwReadSize,nil);    hwFile := CreateFile( pchar(path), GENERIC_WRITE or GENERIC_READ,0,nil,  CREATE_ALWAYS,    FILE_ATTRIBUTE_NORMAL,  0);
        WriteFile(hwFile,wbuff,listlen,dwReadSize,0);
    END ;
    procedure writelistfile;
    var path:string;   hwFile :Thandle;
    BEGIN  
        fun_010E40E0(fun_010C2F10('(list)'));
        SetFilePointer(hFile, 0, nil, FILE_BEGIN);
        SetFilePointer(hFile, listadd, nil, FILE_BEGIN);
        ReadFile(hFile,listbuff,listlen,dwReadSize,0);
        path := wpath+'(list)';    hwFile := CreateFile(pchar(path), GENERIC_WRITE or GENERIC_READ,0, nil ,  CREATE_ALWAYS,    FILE_ATTRIBUTE_NORMAL,  0);
        WriteFile(hwFile,listbuff,listlen,dwReadSize,0);
    END;
      
      
    procedure axp(_rpath:string);stdcall;
    var aa:integer;  liststr:string;   i:integer;
        v:Tstringlist;
        tem , tem1: string ;
        loc:integer;
    BEGIN
        hFile :=fileopen(_rpath, GENERIC_READ );
        ReadFile(hFile,readfilebuff[$28],$60028,dwReadSize,0);
        SetFilePointer(hFile, $60028, 0, FILE_BEGIN);
        asm        pushad        {10C222F}  mov    eax, dword ptr [readfilebuff+$3C]
            {10C223F}  lea    eax, dword ptr [eax+eax*2]
            {10C2242}  shl    eax, 2
                mov aa,eax
                popad
        END;
        ReadFile(hFile,buff2,aa,dwReadSize,0);
        fun_010C3030();
        writelistfile();  
        v:=Tstringlist.Create ;
        for i:=0 to listlen-1 do
        BEGIN  
            if(listbuff[0] <> #$A) then
            BEGIN  
                liststr :=liststr + listbuff;
            END
            else
            BEGIN  
                v.Append  (liststr);
                liststr := '';
            END
        END;    For i:=0 to v.Count -1 do
        Begin
           tem := v.Strings[i];
           loc:=pos('|',tem);
           if loc>0 then begin
              tem1:=copy(tem,1,loc);
              writef(tem1);
           end;
        End;
    END;  
      procedure _tmain;
    var d,p:string;
    BEGIN
    //    printf("天龙八部资源提取小工具\n");
        d := 'F:\TLBB\Data';
        p := d + '\axp';
        CreateDirectory(pchar(p),nil);
        wpath := p+'\Brushes.axp\';
        CreateDirectory( pchar(wpath),nil);
        axp(rpath);  
    //  printf("Brushes.axp提取成功\n")
    //      getchar();
    //  return 0;
    END;