Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Development
You last visited: Today at 11:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]Full EP6 Shaiya Server Files

Discussion on [Release]Full EP6 Shaiya Server Files within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old 10/27/2012, 11:10   #46
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Quote:
Originally Posted by [Admin]Snuggle
Wow..am I really the only one with a database still that is NOT bugged? o.O
It's like russians would say : "Are we the only ones to have nuclear weapons ?". Don't worry, there still are good developers around who keep the information on their progress for themselves.

Quote:
Originally Posted by [Admin]Snuggle
Like my database ep5 files are perfect...then again I edited them extensively.
The only thing my files don't have is the ep5 skills complete. Yet I'm too lazy to edit that :P
These files have fully working ep5 skills, including Archer DoT(Damage over Time) skills.

Quote:
Originally Posted by [Admin]Snuggle
Plus on a side note these aren't really ep6 server files..hope you all know that.
In fact technically we are all working off of ep4 files. Since no one has a ps_game.exe past ep4.
There is quite a bit involved with ep6 actually. It's not just new maps and armors.
<=> 1+1=3. Alright, alright, 1+1=2.
These are ep6 files. Yes, they have a lot of bugs, but they are ep6.
nubness is offline  
Thanks
3 Users
Old 10/27/2012, 12:23   #47
 
elite*gold: 50
Join Date: Sep 2011
Posts: 408
Received Thanks: 1,262
These files arent Encrypted T_T omg.. They're moleboxed which is harder than any encrypter. You cant decrypt them. And such a BIG NO.. Kills arent managed on the database directly. You can bug it and have many kills with only game.exe. It isnt a stupid visual bug, you can get pvp rank rewards from NPC. Also Game.exe has more power than we think, you can simply move any map with any level, buff or mount, add climb hack for any map that you want, you can move to a player without any movement stone, you can get into dark portals etc. with a little Cheat Engine knowledge.

i think these are the same bugged ep 5.6 files from here who released it with "Ep6 server files". You
cant use Trade/IM/See stats. Simply you can use an ep 5.4 client and game.exe to use IM and see stats, for ep6 interface and client, im going to make a huge tutorial about these fixes when i have more time but still i can give tips about trade thingy :P you can simply remove submit button from trade and if you set everything correctly you can remove the button and button's links, you will be able to use "OK" button without confirming.

I'm glad for this release ^^ this makes me think im not the only one who wants our community back, there for in a few days (maybe a week) i will release my own files, even Rec rune/enchant system ^^

Thanks Dino.

P.S. Stop trolling and try to help community.. These guys did something that we didnt. So please shush and try to find more ways to fix these bugs. If you act like you're one of the best developers, so here is challenge. Show your abilities.
JuuF is offline  
Thanks
12 Users
Old 10/27/2012, 13:00   #48
 
elite*gold: 0
Join Date: May 2009
Posts: 8
Received Thanks: 1
Thanks

Thank you dino for the release, granted buggy, but what alot of our fellow devs and hobby players dont understand is the only way these files get debugged is when they are used and the bugs identified, cause *** knows AGE wont debug them for us, our community has been dwindling and these files could bring us back from the nexon and AGE slavery to play our favorite game, my underground hobby server has been lacking in content ive lost reliable players that went back to AGE for the content they offer, once my server upgrade is complete ill allow any devs who wish to assist in debugging use my server as a test subject, as for non devs looking for a place to play, my server is invite only you must be invited by a community member, anyone pming me will be denied if you just want to play, any devs wanting to use my server to test fixes please pm me with your email and nature of the fix and ill get back to you, and again thank you dino

v 198 is good for these files anyone know?

client version 198 i mean


Posted from elitepvpers.com App for Android
ranmasdarkheart is offline  
Thanks
1 User
Old 10/27/2012, 22:13   #49
 
Battle-of-Shaiya's Avatar
 
elite*gold: 260
Join Date: Feb 2011
Posts: 49
Received Thanks: 73
Quote:
Originally Posted by ranmasdarkheart View Post
Thank you dino for the release, granted buggy, but what alot of our fellow devs and hobby players dont understand is the only way these files get debugged is when they are used and the bugs identified, cause *** knows AGE wont debug them for us, our community has been dwindling and these files could bring us back from the nexon and AGE slavery to play our favorite game, my underground hobby server has been lacking in content ive lost reliable players that went back to AGE for the content they offer, once my server upgrade is complete ill allow any devs who wish to assist in debugging use my server as a test subject, as for non devs looking for a place to play, my server is invite only you must be invited by a community member, anyone pming me will be denied if you just want to play, any devs wanting to use my server to test fixes please pm me with your email and nature of the fix and ill get back to you, and again thank you dino

v 198 is good for these files anyone know?

client version 198 i mean


Posted from elitepvpers.com App for Android
OS full update and it wil work version 198 +
Battle-of-Shaiya is offline  
Thanks
1 User
Old 10/28/2012, 02:59   #50
 
elite*gold: 0
Join Date: Oct 2012
Posts: 42
Received Thanks: 44
Thumbs up

Quote:
Originally Posted by JuuF View Post
These files arent Encrypted T_T omg.. They're moleboxed which is harder than any encrypter. You cant decrypt them. And such a BIG NO.. Kills arent managed on the database directly. You can bug it and have many kills with only game.exe. It isnt a stupid visual bug, you can get pvp rank rewards from NPC. Also Game.exe has more power than we think, you can simply move any map with any level, buff or mount, add climb hack for any map that you want, you can move to a player without any movement stone, you can get into dark portals etc. with a little Cheat Engine knowledge.

i think these are the same bugged ep 5.6 files from here who released it with "Ep6 server files". You
cant use Trade/IM/See stats. Simply you can use an ep 5.4 client and game.exe to use IM and see stats, for ep6 interface and client, im going to make a huge tutorial about these fixes when i have more time but still i can give tips about trade thingy :P you can simply remove submit button from trade and if you set everything correctly you can remove the button and button's links, you will be able to use "OK" button without confirming.

I'm glad for this release ^^ this makes me think im not the only one who wants our community back, there for in a few days (maybe a week) i will release my own files, even Rec rune/enchant system ^^

Thanks Dino.

P.S. Stop trolling and try to help community.. These guys did something that we didnt. So please shush and try to find more ways to fix these bugs. If you act like you're one of the best developers, so here is challenge. Show your abilities.
true that i might just release my coded script to were ele lapis are able to basically link into shields for guards basically a little twist i coded to were the shield eles with be workable as well as the basic top ele lapis with everyone contributing i really feel no need to be selfish helping is what i stand for .
xXxSagaLessxXx is offline  
Thanks
2 Users
Old 10/28/2012, 05:59   #51
 
[Admin]Snuggle's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 942
Received Thanks: 1,066
Quote:
Originally Posted by nubness View Post
Don't worry, there still are good developers around who keep the information on their progress for themselves.


These files have fully working ep5 skills, including Archer DoT(Damage over Time) skills.


<=> 1+1=3. Alright, alright, 1+1=2.
These are ep6 files. Yes, they have a lot of bugs, but they are ep6.
I was being sarcastic with my database remark.
Why would I share all my work with the community?
I've done it once and I got an asshole who reposted it with a few edits and claimed to be better lol
Which it's the exact same thing just a different way of doing it -.-
Why give to a community that only takes? Plus makes complete crap with the taking.
There are those select few, but that's an inner circle. One in which I left awhile ago after all the others did.
So yea understand that.

Second off the ep5 skills have been released if you look around and been sold.
So acquiring them isn't hard if you know the right people.
Plus on top of that they aren't that hard to figure out.
I just despise ep5 skills for the most part so I've had no drive to fix them.
Also you just stated something that makes everything flawed. Full Ep5 skills. Ep5.
Ep6 has new skills lol that aren't even fully complete yet.

Lastly, it's nice you can do math good to see we have some smarts in the world still.
Yet on paper does having a bit of an expansion pack make it the next expansion? No it does not.
Let's put it this way. OS has parts of ep6 correct?
We can download that right? Yup.
We take the files with a crappy tool and do a few clicks then we have little sql files.
Now we have some mobs and items into the database! Yay!
It's so simple a caveman can do it! XD minus the bugs it can and does produce.
Anyway. So here's my logic based off what your saying.
I take my ep5 database and throw in some mobs and items then I have ep6 files?
O.o makes sense...lol
Yea your logic has a hole in it.
I explained what this truly is because of two things:
1. We DON'T have official files past Ep4. Why because no one was able to officially get a hold of them past then -.-
Which I actually think is just an edited Ep3 in reality since that's when the files first came around.
2. Understanding the first clue here one would realize that we are all just working off extensive edits without having the official files anymore.
We don't have ep6 because it's not even completely released even in Korea yet.
On top of that OS isn't even close to having all of the content and I have a feeling it will be encrypted just like the Korean one is here soon.
Having new items and maps doesn't make it ep6. I thought we've all been over this?
It's completely false advertising.
It's like saying my ep4 database is ep5 because it's mixed with ep5 things.

I speak based on paper facts. Not some oh yay some new content! That means I have a complete episode!
Just no -.-
[Admin]Snuggle is offline  
Thanks
3 Users
Old 10/28/2012, 09:32   #52
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Quote:
Originally Posted by [Admin]Snuggle
I was being sarcastic with my database remark.
Why would I share all my work with the community?
I've done it once and I got an asshole who reposted it with a few edits and claimed to be better lol
Which it's the exact same thing just a different way of doing it -.-
Why give to a community that only takes? Plus makes complete crap with the taking.
There are those select few, but that's an inner circle. One in which I left awhile ago after all the others did.
So yea understand that.
Sharing your work and information about your work ain't the same thing.
And about people who took your work, made some small changes and then released it as theirs. I can't advise more than using a if you really care about that. Personally, I wouldn't care as long as my release would be, for example, stickied or added to John's index, because that's what really matters.

Quote:
Originally Posted by [Admin]Snuggle
Second off the ep5 skills have been released if you look around and been sold.
So acquiring them isn't hard if you know the right people.
Plus on top of that they aren't that hard to figure out.
I just despise ep5 skills for the most part so I've had no drive to fix them.
Also you just stated something that makes everything flawed. Full Ep5 skills. Ep5.
Ep6 has new skills lol that aren't even fully complete yet.
What if I told you that I've been using these files for a little while and I've already fixed most EP6 skills ?
And the skills that are in this release by default are actually fully working ep5 skills, like no ep5 private server ever had.

Quote:
Originally Posted by [Admin]Snuggle

Lastly, it's nice you can do math good to see we have some smarts in the world still.
Yet on paper does having a bit of an expansion pack make it the next expansion? No it does not.
Let's put it this way. OS has parts of ep6 correct?
We can download that right? Yup.
We take the files with a crappy tool and do a few clicks then we have little sql files.
Now we have some mobs and items into the database! Yay!
It's so simple a caveman can do it! XD minus the bugs it can and does produce.
Anyway. So here's my logic based off what your saying.
I take my ep5 database and throw in some mobs and items then I have ep6 files?
O.o makes sense...lol
Yea your logic has a hole in it.
I explained what this truly is because of two things:
1. We DON'T have official files past Ep4. Why because no one was able to officially get a hold of them past then -.-
Which I actually think is just an edited Ep3 in reality since that's when the files first came around.
2. Understanding the first clue here one would realize that we are all just working off extensive edits without having the official files anymore.
We don't have ep6 because it's not even completely released even in Korea yet.
On top of that OS isn't even close to having all of the content and I have a feeling it will be encrypted just like the Korean one is here soon.
Having new items and maps doesn't make it ep6. I thought we've all been over this?
It's completely false advertising.
It's like saying my ep4 database is ep5 because it's mixed with ep5 things.

I speak based on paper facts. Not some oh yay some new content! That means I have a complete episode!
Just no -.-
You still didn't decide whether we have ep3 or ep4 files, the reason probably being the hole in my logic. What if I told you that ep3 didn't have enchants and rerolls ? There you go, this excludes the option of this being an ep3 set of files.
Next, if you have read what I said about the skills above, and if the hole in your logic ain't bigger than that in mine, you should understand that these files are ep6 ones.
Ok, you may say that they aren't ep6, sure, but they are the closest to ep6 that we have, and people can actually have an ep6 server using these.

If you have any more arguments, I'll be more than glad to screw them with mine .
nubness is offline  
Thanks
3 Users
Old 10/28/2012, 11:18   #53
 
TeddyBear94's Avatar
 
elite*gold: 10
Join Date: May 2012
Posts: 1,857
Received Thanks: 2,632
i have to agree with snuggle on this one.. that are basicly just ep3/4 files which was modded like mad to match to ep5/6 calling them "Full EP6 Server Files" is like calling a little village a big city lol. YET im still happy and i rly apreciate that they was released even if there are still bugs around which need to be fixed but atleast some1 released them so all can have them.
TeddyBear94 is offline  
Thanks
1 User
Old 10/28/2012, 12:21   #54
 
elite*gold: 0
Join Date: Jan 2011
Posts: 8
Received Thanks: 27
Good afternoon.
To be a little more constructive and not fall into the controversy EP3 to EP5 or even 6, these discussions do not advance the work of the community.

For my part, I put a decompiling PS_Game.exe that we work out the bugs, and share our work.

Code:
/* decompiler.
   Copyright (c) 2009 

   Detected compiler: Visual C++
*/

#include <windows.h>
#include <defs.h>


//-------------------------------------------------------------------------
// Data declarations

extern int dword_CC0020[13587448]; // weak
extern _UNKNOWN sub_4098F00; // weak
extern char byte_40A9B04[]; // idb
extern const WCHAR SrcStr; // idb
extern int dword_40A9B10[6]; // weak
extern int dword_40A9B28[3]; // weak
extern const CHAR byte_40AB408; // idb
extern char ProcName[2]; // idb
extern char ModuleName[6]; // idb
extern int dword_40AB444[495]; // weak
extern int dword_40AC148[10]; // weak
extern int dword_40AC4CC[5]; // weak
extern int dword_40AC4E0; // weak
extern int dword_40AC6EC; // weak
extern int dword_40AC700; // weak
extern int (__cdecl *dword_40AC704)(_DWORD, _DWORD, _DWORD); // weak
extern int dword_40AC720; // weak
extern int (*dword_40AC77C)(void); // weak
extern int (__stdcall *dword_40AC7AC)(_DWORD); // weak
extern int (__stdcall *dword_40AC828)(_DWORD); // weak
extern int (__stdcall *dword_40AC874)(_DWORD); // weak
extern int (__stdcall *dword_40AC87C)(_DWORD); // weak
extern int (__stdcall *dword_40AC884)(_DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC888)(_DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC88C)(_DWORD, _DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC890)(_DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC894)(_DWORD); // weak
extern int (__stdcall *dword_40AC898)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC89C)(_DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC8A0)(_DWORD); // weak
extern int (__stdcall *dword_40AC8A4)(_DWORD); // weak
extern int (__stdcall *dword_40AC8A8)(_DWORD); // weak
extern int (__stdcall *dword_40AC8AC)(_DWORD); // weak
extern int (__stdcall *dword_40AC8B0)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC8B4)(_DWORD, _DWORD, _DWORD, _DWORD); // weak
extern int (__stdcall *dword_40AC8B8)(_DWORD); // weak
extern int (__stdcall *dword_40AC8BC)(_DWORD); // weak
extern int (__stdcall *dword_40AC8C0)(_DWORD); // weak
extern int (__stdcall *dword_40AC8C4)(_DWORD, _DWORD); // weak
extern struct _RTL_CRITICAL_SECTION stru_40AC9B8; // idb
extern struct _RTL_CRITICAL_SECTION CriticalSection; // idb
extern _DWORD dword_40B0AD8; // idb
extern _DWORD dword_40B0ADC; // idb
extern int dword_40B0AE8; // weak
extern int dword_40B0AF0; // weak
extern int dword_40B0AFC; // weak
extern int dword_40B0B10; // weak
extern int dword_40B1170; // weak
extern LCID Locale; // idb
extern int dword_40B118C; // weak
extern int dword_40B1194; // weak

//-------------------------------------------------------------------------
// Function declarations

#define __thiscall __cdecl // Test compile in C mode

// void __usercall sub_4097060(int a1<esi>);
bool __thiscall sub_40970D6(int this, int a2, int *a3);
LRESULT __stdcall sub_409715E(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
signed int __stdcall sub_4097216(int a1, int a2);
int __stdcall sub_4097271(int a1);
int __cdecl sub_4097454(int a1);
int __cdecl loc_409746C(int); // weak
signed int __cdecl sub_4097474(int a1, int a2, int a3, int a4);
// int __usercall sub_4097496<eax>(int a1<ebp>, int a2, int a3);
// int __userpurge sub_409752A<eax>(int result<eax>, int a2<ebp>, int a3);
// signed int __usercall sub_409754C<eax>(int a1<ebp>);
int __thiscall sub_409786E(int this, int CharType);
// int __usercall sub_40979EA<eax>(int a1<ecx>, int a2<ebx>, int a3<esi>, signed int *a4);
// int __usercall sub_4097A80<eax>(int a1<eax>, int a2<ebx>, int a3<edi>, int a4<esi>, LCID Locale, DWORD dwMapFlags, LPCSTR lpMultiByteStr, int cbMultiByte, LPSTR lpDestStr, int cchDest, UINT CodePage, int a12);
int __cdecl sub_4097CA4(int a1, int a2);
// BOOL __usercall sub_4097CCF<eax>(int a1<ecx>, int a2<ebx>, int a3<edi>, int a4<esi>, signed int CharType, int a6);
// BOOL __usercall sub_4097DBF<eax>(int a1<eax>, int a2<ebx>, int a3<edi>, int a4<esi>, DWORD dwInfoType, LPCSTR lpMultiByteStr, int cbMultiByte, LPWORD lpCharType, UINT CodePage, LCID Locale, int a11);
void *__cdecl sub_4097F10(void *a1, unsigned __int8 a2, unsigned int a3);
// int __stdcall RtlUnwind(_DWORD, _DWORD, _DWORD, _DWORD); weak
int __cdecl sub_409800C(unsigned int a1, int a2, unsigned int a3);
int __thiscall sub_4098130(int this, int a2, int a3, int a4, int a5);
signed int __thiscall sub_40982F0(int this);
int __fastcall sub_4098330(int a1, char a2);
// void __usercall sub_4098380(int a1<ebx>, int a2, int a3);
// void __usercall sub_4099380(unsigned __int8 a1<al>, int _EBX<ebx>, int a3<esi>);
// double __usercall sub_40A06A6<st0>(unsigned int a1<eax>, int _EDX<edx>, signed int a3<ecx>, int _EBX<ebx>, int _EBP<ebp>, int a6<edi>, int a7<esi>, double a8<st0>);
double loc_40A06F5(); // weak
// void __stdcall InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
// FARPROC __stdcall GetProcAddress(HMODULE hModule, LPCSTR lpProcName);
// HLOCAL __stdcall LocalFree(HLOCAL hMem);
// void __stdcall RaiseException(DWORD dwExceptionCode, DWORD dwExceptionFlags, DWORD nNumberOfArguments, const ULONG_PTR *lpArguments);
// HLOCAL __stdcall LocalAlloc(UINT uFlags, SIZE_T uBytes);
// HMODULE __stdcall GetModuleHandleA(LPCSTR lpModuleName);
// void __stdcall LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
// BOOL __stdcall GetStringTypeA(LCID Locale, DWORD dwInfoType, LPCSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
// int __stdcall LCMapStringW(LCID Locale, DWORD dwMapFlags, LPCWSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest);
// int __stdcall LCMapStringA(LCID Locale, DWORD dwMapFlags, LPCSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);
// int __stdcall WideCharToMultiByte(UINT CodePage, DWORD dwFlags, LPCWSTR lpWideCharStr, int cchWideChar, LPSTR lpMultiByteStr, int cbMultiByte, LPCSTR lpDefaultChar, LPBOOL lpUsedDefaultChar);
// int __stdcall MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar);
// BOOL __stdcall GetStringTypeW(DWORD dwInfoType, LPCWSTR lpSrcStr, int cchSrc, LPWORD lpCharType);
// LRESULT __stdcall DefWindowProcA(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
// BOOL __stdcall AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, DWORD dwExStyle);


//----- (04097060) --------------------------------------------------------
void __usercall sub_4097060(int a1<esi>)
{
  LeaveCriticalSection((LPCRITICAL_SECTION)(a1 + 16));
}

//----- (040970D6) --------------------------------------------------------
bool __thiscall sub_40970D6(int this, int a2, int *a3)
{
  int v3; // eax@1
  int v4; // ebx@1
  int *v5; // esi@1
  int v6; // edi@2
  int v7; // eax@4
  int v8; // ecx@4
  bool result; // eax@8
  int v10; // edi@11
  int v11; // esi@14
  int v12; // [sp+18h] [bp+Ch]@4

  v4 = a2;
  v5 = a3;
  LOBYTE(v3) = *(_BYTE *)a2;
  if ( *(_BYTE *)a2 )
  {
    while ( 1 )
    {
      v6 = *(_BYTE *)v5;
      v3 = (char)v3;
      ++v4;
      if ( (char)v3 == 42 )
        break;
      if ( v3 == 63 )
      {
        if ( !*(_BYTE *)v5 )
          return 0;
      }
      else
      {
        v12 = sub_409786E(this, v3);
        v7 = sub_409786E(v8, v6);
        this = v12;
        if ( v7 != v12 )
          return 0;
      }
      LOBYTE(v3) = *(_BYTE *)v4;
      v5 = (int *)((char *)v5 + 1);
      if ( !*(_BYTE *)v4 )
        goto LABEL_8;
    }
    v10 = 0;
    if ( *(_BYTE *)v5 )
    {
      do
        ++v10;
      while ( *((_BYTE *)v5 + v10) );
      if ( v10 < 0 )
        return 0;
    }
    v11 = (int)((char *)v5 + v10);
    while ( !sub_40970D6(v4, v11) )
    {
      --v10;
      --v11;
      if ( v10 < 0 )
        return 0;
    }
    result = 1;
  }
  else
  {
LABEL_8:
    result = *(_BYTE *)v5 == 0;
  }
  return result;
}

//----- (0409715E) --------------------------------------------------------
LRESULT __stdcall sub_409715E(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
  LRESULT result; // eax@2
  int v5; // [sp+4h] [bp-60h]@2
  int v6; // [sp+44h] [bp-20h]@2
  int v7; // [sp+48h] [bp-1Ch]@2
  int v8; // [sp+4Ch] [bp-18h]@2
  int v9; // [sp+50h] [bp-14h]@2
  int v10; // [sp+54h] [bp-10h]@2
  int v11; // [sp+58h] [bp-Ch]@2
  int v12; // [sp+5Ch] [bp-8h]@2
  int v13; // [sp+60h] [bp-4h]@2

  if ( Msg == 15 )
  {
    v6 = 0;
    v7 = 0;
    v8 = 0;
    v9 = 0;
    v10 = 0;
    v11 = 0;
    dword_40AC88C(dword_40B0AD8, 24, &v6);
    dword_40AC884(hWnd, &v5);
    v12 = dword_40AC874(v5);
    v13 = dword_40AC890(v12, dword_40B0AD8);
    dword_40AC898(v5, 0, 0, v7, v8, v12, 0, 0, dword_CC0020);
    dword_40AC890(v12, v13);
    dword_40AC87C(v12);
    dword_40AC888(hWnd, &v5);
    result = 0;
  }
  else
  {
    result = DefWindowProcA(hWnd, Msg, wParam, lParam);
  }
  return result;
}
// CC0020: using guessed type int dword_CC0020[13587448];
// 40AC874: using guessed type int (__stdcall *dword_40AC874)(_DWORD);
// 40AC87C: using guessed type int (__stdcall *dword_40AC87C)(_DWORD);
// 40AC884: using guessed type int (__stdcall *dword_40AC884)(_DWORD, _DWORD);
// 40AC888: using guessed type int (__stdcall *dword_40AC888)(_DWORD, _DWORD);
// 40AC88C: using guessed type int (__stdcall *dword_40AC88C)(_DWORD, _DWORD, _DWORD);
// 40AC890: using guessed type int (__stdcall *dword_40AC890)(_DWORD, _DWORD);
// 40AC898: using guessed type int (__stdcall *dword_40AC898)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
// 40B0AD8: using guessed type int dword_40B0AD8;

//----- (04097216) --------------------------------------------------------
signed int __stdcall sub_4097216(int a1, int a2)
{
  signed int result; // eax@3
  int v3; // [sp+0h] [bp-4h]@1

  v3 = 0;
  dword_40AC89C(a1, &v3);
  if ( v3 != dword_40AC77C() || a1 == dword_40B0ADC )
  {
    result = 1;
  }
  else
  {
    dword_40AC8C0(dword_40B0ADC);
    dword_40B0ADC = 0;
    dword_40AC8A0(a1);
    dword_40AC8A4(a1);
    result = 0;
  }
  return result;
}
// 40AC77C: using guessed type int (*dword_40AC77C)(void);
// 40AC89C: using guessed type int (__stdcall *dword_40AC89C)(_DWORD, _DWORD);
// 40AC8A0: using guessed type int (__stdcall *dword_40AC8A0)(_DWORD);
// 40AC8A4: using guessed type int (__stdcall *dword_40AC8A4)(_DWORD);
// 40AC8C0: using guessed type int (__stdcall *dword_40AC8C0)(_DWORD);
// 40B0ADC: using guessed type int dword_40B0ADC;

//----- (04097271) --------------------------------------------------------
int __stdcall sub_4097271(int a1)
{
  int v2; // [sp+8h] [bp-54h]@2
  int v3; // [sp+Ch] [bp-50h]@4
  int v4; // [sp+24h] [bp-38h]@1
  int v5; // [sp+28h] [bp-34h]@1
  int v6; // [sp+2Ch] [bp-30h]@1
  int v7; // [sp+30h] [bp-2Ch]@1
  int v8; // [sp+34h] [bp-28h]@1
  int v9; // [sp+38h] [bp-24h]@1
  int v10; // [sp+3Ch] [bp-20h]@1
  int i; // [sp+40h] [bp-1Ch]@7
  int v12; // [sp+44h] [bp-18h]@1
  struct tagRECT Rect; // [sp+48h] [bp-14h]@1
  int v14; // [sp+58h] [bp-4h]@1

  dword_40B0AD8 = a1;
  v4 = 0;
  v5 = 0;
  v6 = 0;
  v7 = 0;
  v8 = 0;
  v9 = 0;
  dword_40AC88C(a1, 24, &v4);
  dword_40B0AE8 = 48;
  dword_40B0AF0 = (int)sub_409715E;
  dword_40B0B10 = (int)dword_40AC148;
  dword_40B0AFC = dword_40AC7AC(0);
  dword_40AC8A8(&dword_40B0AE8);
  v10 = dword_40AC8AC(16);
  v12 = dword_40AC8AC(17);
  Rect.left = (v10 - v5) / 2;
  Rect.top = (v12 - v6) / 2;
  Rect.right = v5 + (v10 - v5) / 2;
  Rect.bottom = v6 + Rect.top;
  AdjustWindowRectEx(&Rect, 0x98800000u, 0, 0);
  v14 = dword_40AC8B0(
          0,
          dword_40AC148,
          &dword_40AC700,
          -1736441856,
          Rect.left,
          Rect.top,
          Rect.right - Rect.left,
          Rect.bottom - Rect.top,
          0,
          0,
          0,
          0);
  dword_40B0ADC = v14;
  while ( dword_40AC8B4(&v2, v14, 0, 0) && (v2 != v14 || v3) )
  {
    dword_40AC8B8(&v2);
    dword_40AC8BC(&v2);
  }
  dword_40AC828(100);
  for ( i = 0; i < 100; ++i )
  {
    dword_40AC8C4(sub_4097216, 0);
    if ( !dword_40B0ADC )
      break;
    dword_40AC828(100);
  }
  dword_40AC894(a1);
  return 0;
}
// 40AC148: using guessed type int dword_40AC148[10];
// 40AC700: using guessed type int dword_40AC700;
// 40AC7AC: using guessed type int (__stdcall *dword_40AC7AC)(_DWORD);
// 40AC828: using guessed type int (__stdcall *dword_40AC828)(_DWORD);
// 40AC88C: using guessed type int (__stdcall *dword_40AC88C)(_DWORD, _DWORD, _DWORD);
// 40AC894: using guessed type int (__stdcall *dword_40AC894)(_DWORD);
// 40AC8A8: using guessed type int (__stdcall *dword_40AC8A8)(_DWORD);
// 40AC8AC: using guessed type int (__stdcall *dword_40AC8AC)(_DWORD);
// 40AC8B0: using guessed type int (__stdcall *dword_40AC8B0)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD);
// 40AC8B4: using guessed type int (__stdcall *dword_40AC8B4)(_DWORD, _DWORD, _DWORD, _DWORD);
// 40AC8B8: using guessed type int (__stdcall *dword_40AC8B8)(_DWORD);
// 40AC8BC: using guessed type int (__stdcall *dword_40AC8BC)(_DWORD);
// 40AC8C4: using guessed type int (__stdcall *dword_40AC8C4)(_DWORD, _DWORD);
// 40B0AE8: using guessed type int dword_40B0AE8;
// 40B0AF0: using guessed type int dword_40B0AF0;
// 40B0AFC: using guessed type int dword_40B0AFC;
// 40B0B10: using guessed type int dword_40B0B10;

//----- (04097454) --------------------------------------------------------
int __cdecl sub_4097454(int a1)
{
  return RtlUnwind(a1, loc_409746C, 0, 0);
}
// 409746C: using guessed type int __cdecl loc_409746C(int);
// 4097F70: using guessed type int __stdcall RtlUnwind(_DWORD, _DWORD, _DWORD, _DWORD);

//----- (04097474) --------------------------------------------------------
signed int __cdecl sub_4097474(int a1, int a2, int a3, int a4)
{
  signed int result; // eax@1

  result = 1;
  if ( *(_DWORD *)(a1 + 4) & 6 )
  {
    *(_DWORD *)a4 = a2;
    result = 3;
  }
  return result;
}

//----- (04097496) --------------------------------------------------------
int __usercall sub_4097496<eax>(int a1<ebp>, int a2, int a3)
{
  int result; // eax@1
  int v4; // ebx@1
  int v5; // esi@1
  int v6; // esi@3

  while ( 1 )
  {
    result = a2;
    v4 = *(_DWORD *)(a2 + 8);
    v5 = *(_DWORD *)(a2 + 12);
    if ( v5 == -1 )
      break;
    if ( v5 == a3 )
      break;
    v6 = 3 * v5;
    *(_DWORD *)(a2 + 12) = *(_DWORD *)(v4 + 4 * v6);
    if ( !*(_DWORD *)(v4 + 4 * v6 + 4) )
    {
      sub_409752A(*(_DWORD *)(v4 + 4 * v6 + 8), a1, 257);
      (*(void (**)(void))(v4 + 4 * v6 + 8))();
    }
  }
  return result;
}

//----- (0409752A) --------------------------------------------------------
int __userpurge sub_409752A<eax>(int result<eax>, int a2<ebp>, int a3)
{
  dword_40AC4CC[2] = *(_DWORD *)(a2 + 8);
  dword_40AC4CC[1] = result;
  dword_40AC4CC[3] = a2;
  return result;
}
// 40AC4CC: using guessed type int dword_40AC4CC[5];

//----- (0409754C) --------------------------------------------------------
signed int __usercall sub_409754C<eax>(int a1<ebp>)
{
  int v1; // eax@1
  int v2; // ebx@1
  int v3; // edi@2
  int v4; // esi@2
  int v5; // eax@5
  int v6; // edi@7
  int v7; // ecx@7
  signed int result; // eax@9
  int v9; // [sp-8h] [bp-20h]@5

  v2 = *(_DWORD *)(a1 + 12);
  v1 = *(_DWORD *)(a1 + 8);
  if ( *(_DWORD *)(v1 + 4) & 6 )
  {
    sub_4097496(v2 + 16, v2, -1);
    result = 1;
  }
  else
  {
    *(_DWORD *)(a1 - 8) = v1;
    *(_DWORD *)(a1 - 4) = *(_DWORD *)(a1 + 16);
    *(_DWORD *)(v2 - 4) = a1 - 8;
    v4 = *(_DWORD *)(v2 + 12);
    v3 = *(_DWORD *)(v2 + 8);
    while ( v4 != -1 )
    {
      if ( *(_DWORD *)(v3 + 12 * v4 + 4) )
      {
        v9 = a1;
        v5 = (*(int (__thiscall **)(int))(v3 + 12 * v4 + 4))(3 * v4);
        a1 = v9;
        v2 = *(_DWORD *)(v9 + 12);
        if ( v5 )
        {
          if ( v5 < 0 )
            return 0;
          v6 = *(_DWORD *)(v2 + 8);
          sub_4097454(*(_DWORD *)(v9 + 12));
          a1 = v2 + 16;
          sub_4097496(v2 + 16, v2, v4);
          sub_409752A(*(_DWORD *)(v6 + 12 * v4 + 8), v2 + 16, 1);
          *(_DWORD *)(v2 + 12) = *(_DWORD *)(v6 + 4 * v7);
          (*(void (**)(void))(v6 + 4 * v7 + 8))();
        }
      }
      v3 = *(_DWORD *)(v2 + 8);
      v4 = *(_DWORD *)(v3 + 12 * v4);
    }
    result = 1;
  }
  return result;
}

//----- (0409786E) --------------------------------------------------------
int __thiscall sub_409786E(int this, int CharType)
{
  int result; // eax@2
  int v3; // ebx@5
  int v4; // eax@7
  int v5; // eax@11
  int v6; // eax@12
  int v7; // eax@14
  CHAR DestStr; // [sp+Ch] [bp-4h]@14
  unsigned __int8 v9; // [sp+Dh] [bp-3h]@17

  if ( Locale )
  {
    v3 = CharType;
    if ( (CharType >= 256
       || (dword_40AC6EC <= 1 ? (v4 = *(_BYTE *)(dword_40AC4E0 + 2 * CharType) & 1) : (v4 = sub_4097CCF(
                                                                                              this,
                                                                                              CharType,
                                                                                              256,
                                                                                              1,
                                                                                              CharType,
                                                                                              1)),
           v4))
      && ((v5 = v3 >> 8, !(*(_BYTE *)(dword_40AC4E0 + 2 * BYTE1(v3) + 1) & 0x80)) ? (BYTE1(CharType) = 0,
                                                                                     LOBYTE(CharType) = v3,
                                                                                     v6 = 1) : (BYTE2(CharType) = 0,
                                                                                                LOBYTE(CharType) = v5,
                                                                                                BYTE1(CharType) = v3,
                                                                                                v6 = 2),
          (v7 = sub_4097A80((int)&CharType, v3, 256, 1, Locale, 0x100u, (LPCSTR)&CharType, v6, &DestStr, 3, 0, 1)) != 0) )
    {
      if ( v7 == 1 )
        result = (unsigned __int8)DestStr;
      else
        result = (unsigned __int8)DestStr | (v9 << 8);
    }
    else
    {
      result = v3;
    }
  }
  else
  {
    result = CharType;
    if ( CharType >= 65 )
    {
      if ( CharType <= 90 )
        result = CharType + 32;
    }
  }
  return result;
}
// 40AC4E0: using guessed type int dword_40AC4E0;
// 40AC6EC: using guessed type int dword_40AC6EC;

//----- (040979EA) --------------------------------------------------------
int __usercall sub_40979EA<eax>(int a1<ecx>, int a2<ebx>, int a3<esi>, signed int *a4)
{
  signed int *i; // edi@1
  int v5; // eax@3
  int v6; // ST04_4@3
  int v7; // ebp@7
  int v8; // edi@7
  int v9; // esi@7
  int v10; // ebx@10
  int v11; // eax@12
  int v12; // ST04_4@12
  int result; // eax@16

  for ( i = a4; ; i = (signed int *)((char *)i + 1) )
  {
    if ( dword_40AC6EC <= 1 )
    {
      a1 = dword_40AC4E0;
      v5 = *(_BYTE *)(dword_40AC4E0 + 2 * *(_BYTE *)i) & 8;
    }
    else
    {
      v5 = sub_4097CCF(a1, a2, (int)i, a3, *(_BYTE *)i, 8);
      a1 = v6;
    }
    if ( !v5 )
      break;
  }
  v9 = *(_BYTE *)i;
  v8 = (int)((char *)i + 1);
  v7 = v9;
  if ( v9 == 45 || v9 == 43 )
    v9 = *(_BYTE *)v8++;
  v10 = 0;
  while ( 1 )
  {
    if ( dword_40AC6EC <= 1 )
    {
      v11 = *(_BYTE *)(dword_40AC4E0 + 2 * v9) & 4;
    }
    else
    {
      v11 = sub_4097CCF(a1, v10, v8, v9, v9, 4);
      a1 = v12;
    }
    if ( !v11 )
      break;
    v10 = v9 + 10 * v10 - 48;
    v9 = *(_BYTE *)v8++;
  }
  result = v10;
  if ( v7 == 45 )
    result = -v10;
  return result;
}
// 40AC4E0: using guessed type int dword_40AC4E0;
// 40AC6EC: using guessed type int dword_40AC6EC;

//----- (04097A80) --------------------------------------------------------
int __usercall sub_4097A80<eax>(int a1<eax>, int a2<ebx>, int a3<edi>, int a4<esi>, LCID Locale, DWORD dwMapFlags, LPCSTR lpMultiByteStr, int cbMultiByte, LPSTR lpDestStr, int cchDest, UINT CodePage, int a12)
{
  int v13; // eax@13
  int v14; // ebx@13
  int v15; // eax@14
  void *v16; // esp@14
  int v17; // eax@16
  int v18; // esi@16
  int v19; // eax@23
  void *v20; // esp@23
  CHAR *v21; // [sp-20h] [bp-48h]@26
  int v22; // [sp-1Ch] [bp-44h]@26
  int v23; // [sp-10h] [bp-38h]@1
  int v24; // [sp-Ch] [bp-34h]@1
  int v25; // [sp-8h] [bp-30h]@1
  int v26; // [sp+0h] [bp-28h]@16
  LPWSTR lpSrcStr; // [sp+4h] [bp-24h]@14
  int *v28; // [sp+8h] [bp-20h]@23
  int cchSrc; // [sp+Ch] [bp-1Ch]@13
  int *v30; // [sp+10h] [bp-18h]@1
  int v31; // [sp+18h] [bp-10h]@1
  signed int (__usercall *v32)<eax>(int<ebp>); // [sp+1Ch] [bp-Ch]@1
  int v33; // [sp+20h] [bp-8h]@1
  int v34; // [sp+24h] [bp-4h]@1

  v34 = -1;
  v33 = (int)dword_40A9B10;
  v32 = sub_409754C;
  v31 = a1;
  v25 = a2;
  v24 = a4;
  v23 = a3;
  v30 = &v23;
  if ( !dword_40B1170 )
  {
    if ( LCMapStringW(0, 0x100u, &SrcStr, 1, 0, 0) )
    {
      dword_40B1170 = 1;
    }
    else
    {
      if ( !LCMapStringA(0, 0x100u, byte_40A9B04, 1, 0, 0) )
        return 0;
      dword_40B1170 = 2;
    }
  }
  if ( cbMultiByte > 0 )
    cbMultiByte = sub_4097CA4((int)lpMultiByteStr, cbMultiByte);
  if ( dword_40B1170 == 2 )
    return LCMapStringA(Locale, dwMapFlags, lpMultiByteStr, cbMultiByte, lpDestStr, cchDest);
  if ( dword_40B1170 != 1 )
    return 0;
  if ( !CodePage )
    CodePage = dword_40B118C;
  v13 = MultiByteToWideChar(CodePage, a12 != 0 ? 9 : 1, lpMultiByteStr, cbMultiByte, 0, 0);
  v14 = v13;
  cchSrc = v13;
  if ( !v13
    || (v15 = 2 * v13 + 3,
        LOBYTE(v15) = v15 & 0xFC,
        v16 = alloca(v15),
        v30 = &v23,
        lpSrcStr = (LPWSTR)&v23,
        v34 = -1,
        !&v23)
    || !MultiByteToWideChar(CodePage, 1u, lpMultiByteStr, cbMultiByte, lpSrcStr, v14)
    || (v17 = LCMapStringW(Locale, dwMapFlags, lpSrcStr, v14, 0, 0), v18 = v17, v26 = v17, !v17) )
    return 0;
  if ( BYTE1(dwMapFlags) & 4 )
  {
    if ( cchDest && (v17 > cchDest || !LCMapStringW(Locale, dwMapFlags, lpSrcStr, v14, (LPWSTR)lpDestStr, cchDest)) )
      return 0;
  }
  else
  {
    v19 = 2 * v17 + 3;
    LOBYTE(v19) = v19 & 0xFC;
    v20 = alloca(v19);
    v30 = &v23;
    v28 = &v23;
    v34 = -1;
    if ( !&v23
      || !LCMapStringW(Locale, dwMapFlags, lpSrcStr, cchSrc, (LPWSTR)&v23, v18)
      || (cchDest ? (v22 = cchDest, v21 = lpDestStr) : (v22 = 0, v21 = 0),
          v18 = WideCharToMultiByte(CodePage, 0x220u, (LPCWSTR)&v23, v18, v21, v22, 0, 0),
          !v18) )
      return 0;
  }
  return v18;
}
// 4097A80: could not find valid save-restore pair for ebx
// 4097A80: could not find valid save-restore pair for edi
// 4097A80: could not find valid save-restore pair for esi
// 40A9B10: using guessed type int dword_40A9B10[6];
// 40B1170: using guessed type int dword_40B1170;
// 40B118C: using guessed type int dword_40B118C;

//----- (04097CA4) --------------------------------------------------------
int __cdecl sub_4097CA4(int a1, int a2)
{
  int v2; // eax@1
  int v3; // ecx@1
  int v4; // esi@3
  int result; // eax@5

  v2 = a1;
  v3 = a2 - 1;
  if ( a2 )
  {
    do
    {
      if ( !*(_BYTE *)v2 )
        break;
      ++v2;
      v4 = v3--;
    }
    while ( v4 );
  }
  if ( *(_BYTE *)v2 )
    result = a2;
  else
    result = v2 - a1;
  return result;
}

//----- (04097CCF) --------------------------------------------------------
BOOL __usercall sub_4097CCF<eax>(int a1<ecx>, int a2<ebx>, int a3<edi>, int a4<esi>, signed int CharType, int a6)
{
  int v6; // eax@2
  signed int v7; // ecx@3
  BOOL result; // eax@6
  int v9; // [sp-4h] [bp-8h]@4
  int MultiByteStr; // [sp+0h] [bp-4h]@1

  MultiByteStr = a1;
  if ( (unsigned int)(CharType + 1) <= 0x100 )
  {
    v6 = *(_WORD *)(dword_40AC4E0 + 2 * CharType);
    return a6 & v6;
  }
  v7 = CharType >> 8;
  if ( *(_BYTE *)(dword_40AC4E0 + 2 * BYTE1(CharType) + 1) & 0x80 )
  {
    LOBYTE(MultiByteStr) = v7;
    *(_WORD *)((char *)&MultiByteStr + 1) = (unsigned __int8)CharType;
    v9 = 2;
  }
  else
  {
    LOWORD(MultiByteStr) = (unsigned __int8)CharType;
    v9 = 1;
  }
  result = sub_4097DBF((int)&MultiByteStr, a2, a3, a4, 1u, (LPCSTR)&MultiByteStr, v9, (LPWORD)&CharType + 1, 0, 0, 1);
  if ( result )
  {
    v6 = HIWORD(CharType);
    return a6 & v6;
  }
  return result;
}
// 40AC4E0: using guessed type int dword_40AC4E0;

//----- (04097DBF) --------------------------------------------------------
BOOL __usercall sub_4097DBF<eax>(int a1<eax>, int a2<ebx>, int a3<edi>, int a4<esi>, DWORD dwInfoType, LPCSTR lpMultiByteStr, int cbMultiByte, LPWORD lpCharType, UINT CodePage, LCID Locale, int a11)
{
  signed int v11; // eax@1
  LCID v12; // eax@8
  int v14; // eax@14
  unsigned int v15; // edi@15
  int v16; // eax@15
  void *v17; // esp@15
  int v18; // eax@16
  int v19; // [sp-10h] [bp-34h]@1
  int v20; // [sp-Ch] [bp-30h]@1
  int v21; // [sp-8h] [bp-2Ch]@1
  int *v22; // [sp+0h] [bp-24h]@15
  int cchWideChar; // [sp+4h] [bp-20h]@14
  WORD CharType; // [sp+8h] [bp-1Ch]@2
  int *v25; // [sp+Ch] [bp-18h]@1
  int v26; // [sp+14h] [bp-10h]@1
  signed int (__usercall *v27)<eax>(int<ebp>); // [sp+18h] [bp-Ch]@1
  int v28; // [sp+1Ch] [bp-8h]@1
  int v29; // [sp+20h] [bp-4h]@1

  v29 = -1;
  v28 = (int)dword_40A9B28;
  v27 = sub_409754C;
  v26 = a1;
  v21 = a2;
  v20 = a4;
  v19 = a3;
  v25 = &v19;
  v11 = dword_40B1194;
  if ( !dword_40B1194 )
  {
    if ( GetStringTypeW(1u, &SrcStr, 1, &CharType) )
    {
      v11 = 1;
    }
    else
    {
      if ( !GetStringTypeA(0, 1u, byte_40A9B04, 1, &CharType) )
        return 0;
      v11 = 2;
    }
    dword_40B1194 = v11;
  }
  if ( v11 != 2 )
  {
    if ( v11 == 1 )
    {
      if ( !CodePage )
        CodePage = dword_40B118C;
      v14 = MultiByteToWideChar(CodePage, a11 != 0 ? 9 : 1, lpMultiByteStr, cbMultiByte, 0, 0);
      cchWideChar = v14;
      if ( v14 )
      {
        v29 = 0;
        v15 = 2 * v14;
        v16 = 2 * v14 + 3;
        LOBYTE(v16) = v16 & 0xFC;
        v17 = alloca(v16);
        v25 = &v19;
        v22 = &v19;
        sub_4097F10(&v19, 0, v15);
        v29 = -1;
        if ( &v19 )
        {
          v18 = MultiByteToWideChar(CodePage, 1u, lpMultiByteStr, cbMultiByte, (LPWSTR)&v19, cchWideChar);
          if ( v18 )
            return GetStringTypeW(dwInfoType, (LPCWSTR)&v19, v18, lpCharType);
        }
      }
    }
    return 0;
  }
  v12 = Locale;
  if ( !Locale )
    v12 = ::Locale;
  return GetStringTypeA(v12, dwInfoType, lpMultiByteStr, cbMultiByte, lpCharType);
}
// 4097DBF: could not find valid save-restore pair for ebx
// 4097DBF: could not find valid save-restore pair for edi
// 4097DBF: could not find valid save-restore pair for esi
// 40A9B28: using guessed type int dword_40A9B28[3];
// 40B118C: using guessed type int dword_40B118C;
// 40B1194: using guessed type int dword_40B1194;

//----- (04097F10) --------------------------------------------------------
void *__cdecl sub_4097F10(void *a1, unsigned __int8 a2, unsigned int a3)
{
  int v3; // edx@1
  int v4; // eax@2
  void *v5; // edi@2
  int v6; // ecx@3
  unsigned int v7; // ecx@6
  unsigned int v8; // ecx@6
  void *result; // eax@9

  v3 = a3;
  if ( a3 )
  {
    LOBYTE(v4) = a2;
    v5 = a1;
    if ( a3 < 4 )
      goto LABEL_13;
    v6 = -(signed int)a1 & 3;
    if ( v6 )
    {
      v3 = a3 - v6;
      do
      {
        *(_BYTE *)v5 = a2;
        v5 = (char *)v5 + 1;
        --v6;
      }
      while ( v6 );
    }
    v4 = 16843009 * a2;
    v8 = v3;
    v3 &= 3u;
    v7 = v8 >> 2;
    if ( !v7 || (memset(v5, v4, 4 * v7), v5 = (char *)v5 + 4 * v7, v3) )
    {
LABEL_13:
      do
      {
        *(_BYTE *)v5 = v4;
        v5 = (char *)v5 + 1;
        --v3;
      }
      while ( v3 );
    }
    result = a1;
  }
  else
  {
    result = a1;
  }
  return result;
}

//----- (0409800C) --------------------------------------------------------
int __cdecl sub_409800C(unsigned int a1, int a2, unsigned int a3)
{
  int v3; // ecx@1
  unsigned int v4; // edi@1
  unsigned int v5; // esi@1
  int result; // eax@2
  unsigned int v7; // edx@4
  unsigned int v8; // eax@7
  int v9; // esi@8
  int v10; // edi@8
  int v11; // esi@8
  int v12; // edi@8
  int v13; // esi@8
  int v14; // edi@8
  int v15; // esi@8
  int v16; // edi@8
  int v17; // esi@8
  int v18; // edi@8
  int v19; // esi@8
  int v20; // edi@8
  int v21; // esi@8
  int v22; // edi@8
  int v23; // esi@8
  int v24; // edi@8
  int v25; // esi@8
  int v26; // edi@8
  int v27; // esi@8
  int v28; // edi@8
  int v29; // esi@8
  int v30; // edi@8
  int v31; // esi@8
  int v32; // edi@8
  int v33; // esi@8
  int v34; // edi@8
  int v35; // esi@8
  int v36; // edi@8
  int v37; // esi@8
  int v38; // edi@8

  v3 = a2;
  v5 = (unsigned __int16)a1;
  v4 = a1 >> 16;
  if ( a2 )
  {
    for ( ; a3; v4 %= 0xFFF1u )
    {
      v7 = 5552;
      if ( a3 < 0x15B0 )
        v7 = a3;
      a3 -= v7;
      if ( (signed int)v7 >= 16 )
      {
        v8 = v7 >> 4;
        v7 += -16 * (v7 >> 4);
        do
        {
          v9 = *(_BYTE *)v3 + v5;
          v10 = v9 + v4;
          v11 = *(_BYTE *)(v3 + 1) + v9;
          v12 = v11 + v10;
          v13 = *(_BYTE *)(v3 + 2) + v11;
          v14 = v13 + v12;
          v15 = *(_BYTE *)(v3 + 3) + v13;
          v16 = v15 + v14;
          v17 = *(_BYTE *)(v3 + 4) + v15;
          v18 = v17 + v16;
          v19 = *(_BYTE *)(v3 + 5) + v17;
          v20 = v19 + v18;
          v21 = *(_BYTE *)(v3 + 6) + v19;
          v22 = v21 + v20;
          v23 = *(_BYTE *)(v3 + 7) + v21;
          v24 = v23 + v22;
          v25 = *(_BYTE *)(v3 + 8) + v23;
          v26 = v25 + v24;
          v27 = *(_BYTE *)(v3 + 9) + v25;
          v28 = v27 + v26;
          v29 = *(_BYTE *)(v3 + 10) + v27;
          v30 = v29 + v28;
          v31 = *(_BYTE *)(v3 + 11) + v29;
          v32 = v31 + v30;
          v33 = *(_BYTE *)(v3 + 12) + v31;
          v34 = v33 + v32;
          v35 = *(_BYTE *)(v3 + 13) + v33;
          v36 = v35 + v34;
          v37 = *(_BYTE *)(v3 + 14) + v35;
          v38 = v37 + v36;
          v5 = *(_BYTE *)(v3 + 15) + v37;
          v4 = v5 + v38;
          v3 += 16;
          --v8;
        }
        while ( v8 );
      }
      for ( ; v7; --v7 )
      {
        v5 += *(_BYTE *)v3++;
        v4 += v5;
      }
      v5 %= 0xFFF1u;
    }
    result = v5 | (v4 << 16);
  }
  else
  {
    result = 1;
  }
  return result;
}

//----- (04098130) --------------------------------------------------------
int __thiscall sub_4098130(int this, int a2, int a3, int a4, int a5)
{
  signed int v5; // edx@8
  char v6; // ST10_1@19
  int v8; // [sp+0h] [bp-1Ch]@1
  int j; // [sp+4h] [bp-18h]@17
  signed int v10; // [sp+8h] [bp-14h]@15
  int v11; // [sp+8h] [bp-14h]@17
  signed int i; // [sp+Ch] [bp-10h]@1
  signed int v13; // [sp+Ch] [bp-10h]@13
  int v14; // [sp+Ch] [bp-10h]@17
  signed int v15; // [sp+10h] [bp-Ch]@6
  signed int v16; // [sp+10h] [bp-Ch]@10
  int v17; // [sp+14h] [bp-8h]@4
  unsigned int v18; // [sp+18h] [bp-4h]@4

  v8 = this;
  *(_DWORD *)this = a2;
  *(_DWORD *)(this + 4) = a4;
  *(_DWORD *)(this + 8) = a3;
  *(_DWORD *)(this + 12) = a5;
  *(_DWORD *)(this + 20) = 0;
  *(_DWORD *)(this + 16) = 0;
  for ( i = 0; i < 4078; ++i )
    *(_BYTE *)(i + this + 24) = 32;
  v17 = 4078;
  v18 = 0;
  while ( 1 )
  {
    while ( 1 )
    {
      v18 >>= 1;
      if ( !(v18 & 0x100) )
      {
        v15 = sub_40982F0(v8);
        if ( v15 == -1 )
          return *(_DWORD *)(v8 + 16);
        v5 = v15;
        BYTE1(v5) = -1;
        v18 = v5;
      }
      if ( !(v18 & 1) )
        break;
      v16 = sub_40982F0(v8);
      if ( v16 == -1 )
        return *(_DWORD *)(v8 + 16);
      sub_4098330(v8, v16);
      *(_BYTE *)(v17 + v8 + 24) = v16;
      v17 = ((_WORD)v17 + 1) & 0xFFF;
    }
    v13 = sub_40982F0(v8);
    if ( v13 == -1 )
      break;
    v10 = sub_40982F0(v8);
    if ( v10 == -1 )
      break;
    v14 = 16 * (unsigned __int8)(v10 & 0xF0) | v13;
    v11 = (v10 & 0xF) + 2;
    for ( j = 0; j <= v11; ++j )
    {
      v6 = *(_BYTE *)(v8 + ((j + v14) & 0xFFF) + 24);
      sub_4098330(v8, *(_BYTE *)(v8 + ((j + v14) & 0xFFF) + 24));
      *(_BYTE *)(v17 + v8 + 24) = v6;
      v17 = ((_WORD)v17 + 1) & 0xFFF;
    }
  }
  return *(_DWORD *)(v8 + 16);
}

//----- (040982F0) --------------------------------------------------------
signed int __thiscall sub_40982F0(int this)
{
  signed int result; // eax@2

  if ( *(_DWORD *)(this + 20) < *(_DWORD *)(this + 8) )
    result = *(_BYTE *)(*(_DWORD *)this + *(_DWORD *)(this + 20)++);
  else
    result = -1;
  return result;
}

//----- (04098330) --------------------------------------------------------
int __fastcall sub_4098330(int a1, char a2)
{
  int result; // eax@1

  result = a1;
  if ( *(_DWORD *)(a1 + 16) < *(_DWORD *)(a1 + 12) )
  {
    *(_BYTE *)(*(_DWORD *)(a1 + 4) + *(_DWORD *)(a1 + 16)) = a2;
    result = a1;
    ++*(_DWORD *)(a1 + 16);
  }
  return result;
}

//----- (04098380) --------------------------------------------------------
void __usercall sub_4098380(int a1<ebx>, int a2, int a3)
{
  int v3; // ST30_4@19
  int v4; // eax@21
  int v5; // esi@27
  const void *v6; // esi@27
  int v7; // ecx@27
  unsigned __int8 v8; // al@31
  signed int v9; // [sp+10h] [bp-68h]@18
  int i; // [sp+14h] [bp-64h]@21
  int v11; // [sp+18h] [bp-60h]@24
  int v12; // [sp+1Ch] [bp-5Ch]@24
  int v13; // [sp+24h] [bp-54h]@19
  unsigned int v14; // [sp+28h] [bp-50h]@24
  int v15; // [sp+2Ch] [bp-4Ch]@21
  HLOCAL v16; // [sp+30h] [bp-48h]@24
  signed int v17; // [sp+34h] [bp-44h]@1
  int v18; // [sp+38h] [bp-40h]@2
  unsigned int v19; // [sp+40h] [bp-38h]@7
  int v20; // [sp+44h] [bp-34h]@7
  int v21; // [sp+48h] [bp-30h]@2
  int v22; // [sp+4Ch] [bp-2Ch]@2
  unsigned int v23; // [sp+50h] [bp-28h]@7
  int v24; // [sp+54h] [bp-24h]@7
  int v25; // [sp+58h] [bp-20h]@4
  HLOCAL v26; // [sp+5Ch] [bp-1Ch]@7
  HMODULE v27; // [sp+60h] [bp-18h]@1
  int (*v28)(void); // [sp+64h] [bp-14h]@16
  int v29; // [sp+68h] [bp-10h]@1
  HMODULE v30; // [sp+6Ch] [bp-Ch]@14
  HLOCAL v31; // [sp+70h] [bp-8h]@1
  int v32; // [sp+74h] [bp-4h]@1

  v27 = GetModuleHandleA(0);
  v31 = LocalAlloc(0x40u, 0xD440u);
  v32 = a3 - 1018;
  v29 = a3 - 1022;
  v17 = 1;
  while ( 1 )
  {
    do
    {
      v21 = 40 * *(_DWORD *)v29 + v32 - 40 * v17++;
      v18 = (int)((char *)v27 + *(_DWORD *)(v21 + 12));
      v22 = (int)((char *)v27 + *(_DWORD *)(v21 + 12) + *(_DWORD *)(v21 + 8));
    }
    while ( v18 > (unsigned int)dword_40AB444 );
    if ( (unsigned int)dword_40AB444 < v22 )
    {
      v25 = (int)((char *)v27 + *(_DWORD *)(v21 + 12));
      while ( v18 < (unsigned int)v22 )
      {
        v25 = 1664525 * v25 + 1013904245;
        *(_DWORD *)v18 ^= v25;
        v18 += 4;
      }
      v24 = (int)((char *)v27 + *(_DWORD *)(v21 + 12));
      v23 = *(_DWORD *)v24;
      v19 = *(_DWORD *)(v24 + 4);
      v20 = *(_DWORD *)(v24 + 8);
      v26 = LocalAlloc(0x40u, *(_DWORD *)(v24 + 4));
      if ( !v26 || v19 > 0x10000 )
        RaiseException(0xEF0000FEu, 0, 0, 0);
      memcpy(v26, (const void *)(v24 + 12), v19);
      if ( sub_4098130((int)v31, (int)v26, v19, v24, v23) != v23 )
        RaiseException(0xEF0000F8u, 0, 0, 0);
      if ( sub_409800C(0, v24, v23) != v20 )
        RaiseException(0xEF0000FAu, 0, 0, 0);
      LocalFree(v26);
      v30 = GetModuleHandleA("“.rïªÆ");
      if ( !v30 )
        RaiseException(0xEF0000FDu, 0, 0, 0);
      dword_40AC704 = (int (__cdecl *)(_DWORD, _DWORD, _DWORD))GetProcAddress(v30, "›¿");
      v28 = GetProcAddress(v30, &byte_40AB408);
      if ( !dword_40AC704 )
        RaiseException(0xEF0000FCu, 0, 0, 0);
      dword_40AC720 = v28();
      v9 = 3;
      while ( 1 )
      {
        do
        {
          v3 = 40 * *(_DWORD *)v29 + v32 - 40 * v9++;
          v13 = (int)((char *)v27 + *(_DWORD *)(v3 + 12) + *(_DWORD *)(v3 + 8));
        }
        while ( (unsigned int)((char *)v27 + *(_DWORD *)(v3 + 12)) >= a2 );
        if ( a2 < (unsigned int)v13 )
        {
          v15 = a2;
          v4 = a2 + 12;
          LOBYTE(v4) = (a2 + 12) & 0xFC;
          for ( i = v4; i < (unsigned int)v13; i += 4 )
          {
            v15 = 1664525 * v15 + 1013904245;
            *(_DWORD *)i ^= v15;
          }
          v14 = *(_DWORD *)a2;
          v11 = *(_DWORD *)(a2 + 4);
          v12 = *(_DWORD *)(a2 + 8);
          v16 = LocalAlloc(0x40u, *(_DWORD *)(a2 + 4));
          if ( !v16 || (unsigned int)v11 > 0x10000 )
            RaiseException(0xEF0000FFu, 0, 0, 0);
          memcpy(v16, (const void *)(a2 + 12), 4 * ((unsigned int)v11 >> 2));
          v6 = (const void *)(a2 + 12 + 4 * ((unsigned int)v11 >> 2));
          v7 = v11 & 3;
          memcpy((char *)v16 + 4 * ((unsigned int)v11 >> 2), v6, v7);
          v5 = (int)((char *)v6 + v7);
          if ( sub_4098130((int)v31, (int)v16, v11, a2, v14) != v14 )
            RaiseException(0xEF0000F9u, 0, 0, 0);
          if ( sub_409800C(0, a2, v14) != v12 )
            RaiseException(0xEF0000FBu, 0, 0, 0);
          dword_40AC704(dword_40AC720, a2, v14);
          LocalFree(v16);
          LocalFree(v31);
          InitializeCriticalSection(&CriticalSection);
          InitializeCriticalSection(&stru_40AC9B8);
          sub_4099380(v8, a1, v5);
        }
      }
    }
  }
}
// 40AB444: using guessed type int[495];
// 40AC704: using guessed type int (__cdecl *dword_40AC704)(_DWORD, _DWORD, _DWORD);
// 40AC720: using guessed type int dword_40AC720;

//----- (04098F00) --------------------------------------------------------
#error "4098F07: call analysis failed (funcsize=3)"

//----- (04099380) --------------------------------------------------------
void __usercall sub_4099380(unsigned __int8 a1<al>, int _EBX<ebx>, int a3<esi>)
{
  int v3; // esi@1
  char v4; // cf@2
  char v7; // t0@2

  v3 = a3 + 1;
  __asm { into }
  v4 = a1 < (unsigned __int8)(((unsigned __int8)((unsigned __int64)(265331699i64 * *(_DWORD *)(v3 + 1232466341)) >> 32) != 0)
                            - 98);
  _AL = a1 - (((unsigned __int8)((unsigned __int64)(265331699i64 * *(_DWORD *)(v3 + 1232466341)) >> 32) != 0) - 98);
  BYTE1(_EBX) = 30;
  __asm { xlat }
  v7 = __RCL__(v277eb34e, v4);
  v277eb34e = v7;
  JUMPOUT(v98b1264a);
}

//----- (040A06A6) --------------------------------------------------------
double __usercall sub_40A06A6<st0>(unsigned int a1<eax>, int _EDX<edx>, signed int a3<ecx>, int _EBX<ebx>, int _EBP<ebp>, int a6<edi>, int a7<esi>, double a8<st0>)
{
  char v8; // t0@4
  unsigned __int8 v13; // pf@1
  double result; // st7@5
  int v15; // [sp-1h] [bp-1h]@1

  while ( 1 )
  {
    _OF = 0;
    _CF = 0;
    _ZF = (BYTE1(a1) | *(_BYTE *)(_EDX + 1015541671)) == 0;
    _SF = (BYTE1(a1) | *(_BYTE *)(_EDX + 1015541671)) < 0;
    *(_BYTE *)(_EDX + 1015541671) |= BYTE1(a1);
    BYTE1(_EDX) = 54;
    __asm { pushf }
    ++a7;
    ++a6;
    _EBX |= _EBP;
    JUMPOUT(_EBX >= 0, *(unsigned int *)((char *)loc_40A06F5 + 3));
    v15 += 905969664;
    --a1;
    __asm { arpl    [ebp+1271CF74h], dx }
    v13 = __SETP__(*(_DWORD *)a7 + 99, 0);
    *(_DWORD *)a7 += 99;
    do
      LOWORD(a3) = a3 - 1;
    while ( (_WORD)a3 );
    if ( !v13 )
      break;
    a3 = 1876962779;
    v8 = __ROL__(*(_BYTE *)(a1 - 1249390667), 1);
    *(_BYTE *)(a1 - 1249390667) = v8;
    __asm { arpl    [ebp-7Bh], dx }
  }
  *(_BYTE *)(a1 + 109) += a3 + (*(_DWORD *)a6 < a1);
  __asm { setalc }
  result = a8 * *(double *)a3;
  __asm { rcr     byte ptr [ebx+5Dh], 0B1h }
  return result;
}
// 40A06F5: using guessed type double();

Sincerely yours
algaracan22 is offline  
Thanks
13 Users
Old 10/28/2012, 13:26   #55
 
[GM]LordChaos's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 24
Received Thanks: 65
Happy to see that someone posted endlessly something usefull.

But the ps_game.exe isn't actually bugged. It is fully working.


[Edit]: And whatever you would call it, basic ep3/4 being changed to ep6? Well, as nubness said, enchants were included in this ps_game, making the respective .ini working. Same for all the maps, for the quests and for the skills.

I don't see where the trouble is, given that the things I just quoted are working.

And if you're not actually happy about this ps_game.exe "EP6" or EP6, I don't know what you're looking for later. But there are 2 solutions:

- Accept that this one could make you run an ep 6 server or "ep6 server".
- Waiting for another to get released or to work on the ps_game.exe ep 5 to make it ep6.

Whatever you will do, I hope you know what you're doing. And I'll be glad for you if you take your time to recompile a fully released executable file which would take so much time.

Whatever,

Good luck to anyone choosing the second option. But if you choose the first one, try to help out the other ones who are working on or losing time to fix things that aren't in.
[GM]LordChaos is offline  
Thanks
11 Users
Old 10/28/2012, 16:16   #56
 
[Admin]Snuggle's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 942
Received Thanks: 1,066
Quote:
Originally Posted by nubness View Post
These are ep6 files. Yes, they have a lot of bugs, but they are ep6.
Quote:
Originally Posted by nubness View Post
but they are the closest to ep6 that we have
Enough said. Try again <3
Enjoy your time trying to make me look stupid.
Yet if you actually opened the skill.sdata of ep6, which you can't with shstudio, you'd know the ep6 skills aren't from ep5.
So tell me what you want it doesn't make it fact.
I've stated that they are extensively edited files and NOT really ep6 ones.
I never said it didn't contain ep6 files. I said it wasn't officially ep6.
It can't be because no one running a private server has the files.
Now enjoy arguing with yourself because I'm done here. I've stated what I have to say.
Also stop using ill placed commas....it's really annoying.
Plus "ain't" yea I'm really going to continue wasting my time on someone who uses that word...
My point being and I'll state it again. These aren't the real ep6 files.
I hate people that false advertise. These are a collection of files that make up a combination of ep4, ep5, and what OS currently has of ep6 files.
I say that because I've been around for a really long time -.- I know what goes on in this community.
Despite that all and this petty argument seems some people do have use for these even if it can be done on your own with a bit of time and effort.
To each their own.

On a side note I have no interest in advancing this community. I stopped caring about that when people like lph left.
I still have my right to post and critic people as I see fit while staying within the rules. Obviously I've gotten this far.
I stay within this community due to all the people I know. Despite the ones I dislike.
The friends I have here also know that when I put my game in alpha stages they will be getting the game keys for it.
The community also knows that upon beta phase they will all get access to it.
Of course my game will have absolutely nothing to do with Shaiya at all.
Yet being in a community for about four years they grow on you.
That's why there's a thread for Ascended here and there shall be a thread for my game if Shaiya is still around then.
Like I said to each their own.
[Admin]Snuggle is offline  
Thanks
2 Users
Old 10/28/2012, 16:42   #57
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
****, I hope John has enough patience for this argument but Snuggle, you aren't totally right. I have to admit I may not be totally right either, but if these files are ep3/4 as you say, why didn't you start such a huge argument on that in threads of releases of ep5 server files ?
I could say a lot more but it's a waste of time, you seem to be too wise to understand my meaningless ****.

P.S. Knowing English at a high level and making wrong use of commas are totally different things.
nubness is offline  
Thanks
5 Users
Old 10/29/2012, 18:56   #58
 
Dreameh's Avatar
 
elite*gold: 360
Join Date: Jul 2012
Posts: 143
Received Thanks: 228
Quote:
Originally Posted by PrinceDino View Post
Hello everyone.



Edit: Found it. Are the new sets encrypted? Weird that there in the client and not in the item.sdata
Dreameh is offline  
Thanks
2 Users
Old 10/29/2012, 19:57   #59
 
nubness's Avatar
 
elite*gold: 10
Join Date: Jan 2012
Posts: 1,698
Received Thanks: 5,456
Hehe, that's what I thought too when I first checked Item.SData, but later I discovered that I was wrong. The SetItem.SData doesn't contain any item. What it does contain are the bonus things you get when you wear the end game gear.
All the items are still in the Item.SData file. It just so happens that ShStudio includes only items with a specific Type code in the specific tab. If you check the All Items tab, you can find everything there.
nubness is offline  
Thanks
5 Users
Old 10/29/2012, 22:42   #60
 
Battle-of-Shaiya's Avatar
 
elite*gold: 260
Join Date: Feb 2011
Posts: 49
Received Thanks: 73
the new gear is in item id 72 and higher
Battle-of-Shaiya is offline  
Thanks
5 Users
Reply


Similar Threads Similar Threads
[Shaiya Server Full EP6] Shaiya Origens
04/21/2014 - Shaiya PServer Advertising - 3 Replies
#removed
WTT Rebirth World War Ep6 Fighter set for Haven Warrior ep6 set
12/10/2012 - Shaiya Trading - 2 Replies
Rebirth World War set : Fighter ep6 ( White version ) Full God 9 lapis Premium Accs LLd No Gm reroll No Episode 6 weapons +any item for 50k ap. FOR : Haven Shaiya set ep6 ( Warrior )



All times are GMT +1. The time now is 11:32.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.